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

This commit is contained in:
roytam1 2025-01-29 12:26:22 +08:00
commit bf90272692
6 changed files with 776 additions and 837 deletions

View file

@ -12953,10 +12953,11 @@ nsGlobalWindow::RunTimeoutHandler(Timeout* aTimeout,
nsJSUtils::ExecutionContext exec(aes.cx(), global);
rv = exec.Compile(options, handler->GetHandlerText());
if (rv == NS_OK) {
JS::Rooted<JSScript*> script(aes.cx(), exec.GetScript());
if (script) {
LoadedScript* initiatingScript = handler->GetInitiatingScript();
if (initiatingScript) {
initiatingScript->AssociateWithScript(exec.GetScript());
initiatingScript->AssociateWithScript(script);
}
rv = exec.ExecScript();

View file

@ -315,8 +315,11 @@ nsJSUtils::ExecutionContext::JoinDecode(void **aOffThreadToken)
}
JSScript* nsJSUtils::ExecutionContext::GetScript() {
if (mSkip) {
return nullptr;
}
#ifdef DEBUG
MOZ_ASSERT(!mSkip);
MOZ_ASSERT(mScript);
mScriptUsed = true;
#endif

View file

@ -163,7 +163,10 @@ public:
// thread.
nsresult JoinDecode(void** aOffThreadToken);
// Get a successfully compiled script.
// Get the compiled script if present, or nullptr.
//
// Compilation may succeed without producing a script when scripting is disabled for the global. Causes for this can
// be the global pref or dynamic change when script execution in a global is terminated due to max_script_run_time.
JSScript* GetScript();
// Execute the compiled script and ignore the return value.

View file

@ -2377,10 +2377,7 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
rv = exec.Compile(options, srcBuf);
}
if (rv == NS_OK) {
JS::Rooted<JSScript*> script(cx);
script = exec.GetScript();
// With scripts disabled GetScript() will return nullptr
JS::Rooted<JSScript*> script(cx, exec.GetScript());
if (script) {
// Create a ClassicScript object and associate it with the
// JSScript.

View file

@ -4519,6 +4519,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(
// Check if we need to apply "Automatic Minimum Size" and cache it.
if ((state & TrackSize::eAutoMinSizing) &&
!(state & TrackSize::eFlexMaxSizing) &&
gridItem.ShouldApplyAutoMinSize(wm, mAxis, aPercentageBasis)) {
gridItem.mState[mAxis] |= ItemState::eApplyAutoMinSize;
}

File diff suppressed because it is too large Load diff