mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #2252 - Prevent crash when attempting to load a script with execution disallowed. This issue is due to the ExecutionContext added in Issue #1691 not handling GetScript() in a context where script execution is not allowed. This expressed itself in crashes when playing MP4s with the NoScript extension installed and enabled.
This commit is contained in:
parent
adaf6c3221
commit
106de86dc4
1 changed files with 8 additions and 5 deletions
|
|
@ -2363,11 +2363,14 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
|
||||||
JS::Rooted<JSScript*> script(cx);
|
JS::Rooted<JSScript*> script(cx);
|
||||||
script = exec.GetScript();
|
script = exec.GetScript();
|
||||||
|
|
||||||
// Create a ClassicScript object and associate it with the
|
// With scripts disabled GetScript() will return nullptr
|
||||||
// JSScript.
|
if (script) {
|
||||||
RefPtr<ClassicScript> classicScript = new ClassicScript(
|
// Create a ClassicScript object and associate it with the
|
||||||
aRequest->mFetchOptions, aRequest->mBaseURL);
|
// JSScript.
|
||||||
classicScript->AssociateWithScript(script);
|
RefPtr<ClassicScript> classicScript = new ClassicScript(
|
||||||
|
aRequest->mFetchOptions, aRequest->mBaseURL);
|
||||||
|
classicScript->AssociateWithScript(script);
|
||||||
|
}
|
||||||
|
|
||||||
rv = exec.ExecScript();
|
rv = exec.ExecScript();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue