mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +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
|
|
@ -446,7 +446,7 @@ js::InternalCallOrConstruct(JSContext* cx, const CallArgs& args, MaybeConstruct
|
|||
}
|
||||
|
||||
/* Invoke native functions. */
|
||||
JSFunction* fun = &args.callee().as<JSFunction>();
|
||||
RootedFunction fun(cx, &args.callee().as<JSFunction>());
|
||||
if (construct != CONSTRUCT && fun->isClassConstructor()) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CANT_CALL_CLASS_CONSTRUCTOR);
|
||||
return false;
|
||||
|
|
@ -457,7 +457,7 @@ js::InternalCallOrConstruct(JSContext* cx, const CallArgs& args, MaybeConstruct
|
|||
return CallJSNative(cx, fun->native(), args);
|
||||
}
|
||||
|
||||
if (!fun->getOrCreateScript(cx))
|
||||
if (!JSFunction::getOrCreateScript(cx, fun))
|
||||
return false;
|
||||
|
||||
/* Run function until JSOP_RETRVAL, JSOP_RETURN or error. */
|
||||
|
|
@ -2999,7 +2999,7 @@ CASE(JSOP_FUNCALL)
|
|||
{
|
||||
MOZ_ASSERT(maybeFun);
|
||||
ReservedRooted<JSFunction*> fun(&rootFunction0, maybeFun);
|
||||
ReservedRooted<JSScript*> funScript(&rootScript0, fun->getOrCreateScript(cx));
|
||||
ReservedRooted<JSScript*> funScript(&rootScript0, JSFunction::getOrCreateScript(cx, fun));
|
||||
if (!funScript)
|
||||
goto error;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue