1320408 - Part 2: Change JSFunction::getOrCreateScript to static method.

This commit is contained in:
Gaming4JC 2019-06-08 18:54:17 -04:00 committed by Roy Tam
commit 07cd213071
28 changed files with 69 additions and 58 deletions

View file

@ -555,7 +555,7 @@ CreateThis(JSContext* cx, HandleObject callee, HandleObject newTarget, MutableHa
if (callee->is<JSFunction>()) {
RootedFunction fun(cx, &callee->as<JSFunction>());
if (fun->isInterpreted() && fun->isConstructor()) {
JSScript* script = fun->getOrCreateScript(cx);
JSScript* script = JSFunction::getOrCreateScript(cx, fun);
if (!script || !script->ensureHasTypes(cx))
return false;
if (fun->isBoundFunction() || script->isDerivedClassConstructor()) {