mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-04 05:27:35 +09:00
Use canonical function in TypeNewScript::rollbackPartiallyInitializedObjects.
This commit is contained in:
parent
e9bdcb12f3
commit
518106945b
3 changed files with 26 additions and 7 deletions
|
|
@ -496,12 +496,7 @@ ObjectGroup::defaultNewGroup(ExclusiveContext* cx, const Class* clasp,
|
|||
|
||||
// Canonicalize new functions to use the original one associated with its script.
|
||||
JSFunction* fun = &associated->as<JSFunction>();
|
||||
if (fun->hasScript())
|
||||
associated = fun->nonLazyScript()->functionNonDelazifying();
|
||||
else if (fun->isInterpretedLazy() && !fun->isSelfHostedBuiltin())
|
||||
associated = fun->lazyScript()->functionNonDelazifying();
|
||||
else
|
||||
associated = nullptr;
|
||||
associated = associated->as<JSFunction>().maybeCanonicalFunction();
|
||||
|
||||
// If we have previously cleared the 'new' script information for this
|
||||
// function, don't try to construct another one.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue