diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-12-13 11:34:00 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-13 11:34:00 +0100 |
commit | 42766ad06f7d37b507a500c8d78002d25fd804f8 (patch) | |
tree | 1dcebad9b2448090b626239104bc395d4d47d230 /js/src/vm/ObjectGroup.cpp | |
parent | bc8a25f5e33700f700b1e07b238bef5dae22f1ad (diff) | |
download | uxp-42766ad06f7d37b507a500c8d78002d25fd804f8.tar.gz |
Use canonical function in TypeNewScript::rollbackPartiallyInitializedObjects.
Diffstat (limited to 'js/src/vm/ObjectGroup.cpp')
-rw-r--r-- | js/src/vm/ObjectGroup.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp index d6a8fcaa46..1fbf8976b6 100644 --- a/js/src/vm/ObjectGroup.cpp +++ b/js/src/vm/ObjectGroup.cpp @@ -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. |