mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
1320408 - Part 2: Change JSFunction::getOrCreateScript to static method.
This commit is contained in:
parent
6633322957
commit
07cd213071
28 changed files with 69 additions and 58 deletions
|
|
@ -3549,7 +3549,7 @@ CloneFunctionObject(JSContext* cx, HandleObject funobj, HandleObject env, Handle
|
|||
RootedFunction fun(cx, &funobj->as<JSFunction>());
|
||||
if (fun->isInterpretedLazy()) {
|
||||
AutoCompartment ac(cx, funobj);
|
||||
if (!fun->getOrCreateScript(cx))
|
||||
if (!JSFunction::getOrCreateScript(cx, fun))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -3581,7 +3581,7 @@ CloneFunctionObject(JSContext* cx, HandleObject funobj, HandleObject env, Handle
|
|||
// Fail here if we OOM during debug asserting.
|
||||
// CloneFunctionReuseScript will delazify the script anyways, so we
|
||||
// are not creating an extra failure condition for DEBUG builds.
|
||||
if (!fun->getOrCreateScript(cx))
|
||||
if (!JSFunction::getOrCreateScript(cx, fun))
|
||||
return nullptr;
|
||||
MOZ_ASSERT(scope->as<GlobalScope>().isSyntactic() ||
|
||||
fun->nonLazyScript()->hasNonSyntacticScope());
|
||||
|
|
@ -4234,7 +4234,7 @@ JS_GetFunctionScript(JSContext* cx, HandleFunction fun)
|
|||
return nullptr;
|
||||
if (fun->isInterpretedLazy()) {
|
||||
AutoCompartment funCompartment(cx, fun);
|
||||
JSScript* script = fun->getOrCreateScript(cx);
|
||||
JSScript* script = JSFunction::getOrCreateScript(cx, fun);
|
||||
if (!script)
|
||||
MOZ_CRASH();
|
||||
return script;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue