Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2025-02-18 19:13:36 +08:00
commit d4f1c1faed
3 changed files with 27 additions and 8 deletions

View file

@ -263,7 +263,7 @@ nsCSPContext::permitsInternal(CSPDirective aDir,
// Do not send a report or notify observers if this is a preload - the
// decision may be wrong due to the inability to get the nonce, and will
// incorrectly fail the unit tests.
if (CSPService::sCSPReportingEnabled && (!aIsPreload && aSendViolationReports)) {
if (CSPService::sCSPReportingEnabled && !aIsPreload && aSendViolationReports) {
uint32_t lineNumber = 0;
uint32_t columnNumber = 0;
nsAutoCString spec;
@ -648,9 +648,11 @@ nsCSPContext::GetAllowsInline(CSPDirective aDirective,
keyword, observerTopic) \
case nsIContentSecurityPolicy::VIOLATION_TYPE_ ## violationType : \
PR_BEGIN_MACRO \
if (CSPService::sCSPReportingEnabled && \
(!mPolicies[p]->allows(directive##_SRC_DIRECTIVE, keyword, nonceOrHash,\
false))) { \
static_assert(directive##_SRC_DIRECTIVE == SCRIPT_SRC_DIRECTIVE || \
directive##_SRC_DIRECTIVE == STYLE_SRC_DIRECTIVE); \
if(CSPService::sCSPReportingEnabled && \
!mPolicies[p]->allows(directive##_SRC_DIRECTIVE, keyword, nonceOrHash, \
false)) { \
nsAutoString violatedDirective; \
mPolicies[p]->getDirectiveStringForContentType( \
directive##_SRC_DIRECTIVE, violatedDirective); \

View file

@ -1700,6 +1700,8 @@ JSStructuredCloneWriter::write(HandleValue v)
return false;
if (cls == ESClass::Map) {
if (!counts.back())
return false;
counts.back()--;
RootedValue val(context(), entries.back());
entries.popBack();

View file

@ -3793,10 +3793,25 @@ MeasuringReflow(nsIFrame* aChild,
nsIFrame::ReflowChildFlags::NoMoveFrame |
nsIFrame::ReflowChildFlags::NoSizeView |
nsIFrame::ReflowChildFlags::NoDeleteNextInFlowChild;
parent->ReflowChild(aChild, pc, childSize, childRI, wm,
LogicalPoint(wm), nsSize(), flags, childStatus);
parent->FinishReflowChild(aChild, pc, childSize, &childRI, wm,
LogicalPoint(wm), nsSize(), flags);
if (childSize.mBoundingMetrics.width != 0) {
parent->ReflowChild(aChild,
pc,
childSize,
childRI,
wm,
LogicalPoint(wm),
nsSize(),
flags,
childStatus);
parent->FinishReflowChild(aChild,
pc,
childSize,
&childRI,
wm,
LogicalPoint(wm),
nsSize(),
flags);
}
#ifdef DEBUG
parent->DeleteProperty(nsContainerFrame::DebugReflowingWithInfiniteISize());
#endif