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

@ -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.