Bug 1518075 - Add check for null script because compilation can 'succeed' if scripting is disabled r=smaug
This commit is contained in:
@@ -2444,6 +2444,11 @@ static nsresult ExecuteCompiledScript(JSContext* aCx,
|
||||
ScriptLoadRequest* aRequest,
|
||||
nsJSUtils::ExecutionContext& aExec) {
|
||||
JS::Rooted<JSScript*> script(aCx, aExec.GetScript());
|
||||
if (!script) {
|
||||
// Compilation succeeds without producing a script if scripting is
|
||||
// disabled for the global.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Create a ClassicScript object and associate it with the JSScript.
|
||||
RefPtr<ClassicScript> classicScript =
|
||||
|
||||
Reference in New Issue
Block a user