mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #2686 - Don't rely on return value of ExecutionContext::Compile when the context may forbid running scripts (0590764f)
This commit is contained in:
@@ -2396,10 +2396,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.
|
||||
|
||||
Reference in New Issue
Block a user