author | Shu-yu Guo <shu@rfrn.org> |
Thu, 13 Mar 2014 22:40:17 -0700 | |
changeset 173524 | 0a5ec8ab99a295e115e30922f5f6ffea51a07816 |
parent 173523 | 8339097d306081f180b0cc621390725dab35f3d3 |
child 173549 | d527230a20321fec0c390502383724d16b7ad846 |
child 173647 | b2e50a5b5eb327a4dd35d18656dc10ee9cab76f1 |
push id | 26407 |
push user | cbook@mozilla.com |
push date | Fri, 14 Mar 2014 11:34:21 +0000 |
treeherder | mozilla-central@0a5ec8ab99a2 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | me |
bugs | 980585 |
milestone | 30.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -715,33 +715,30 @@ AddInnerLazyFunctionsFromScript(JSScript } static bool CreateLazyScriptsForCompartment(JSContext *cx) { AutoObjectVector lazyFunctions(cx); // Find all live lazy scripts in the compartment, and via them all root - // lazy functions in the compartment: those which have not been compiled - // and which have a source object, indicating that they have a parent. + // lazy functions in the compartment: those which have not been compiled, + // which have a source object, indicating that they have a parent, and + // which do not have an uncompiled enclosing script. The last condition is + // so that we don't compile lazy scripts whose enclosing scripts failed to + // compile, indicating that the lazy script did not escape the script. for (gc::CellIter i(cx->zone(), gc::FINALIZE_LAZY_SCRIPT); !i.done(); i.next()) { LazyScript *lazy = i.get<LazyScript>(); JSFunction *fun = lazy->functionNonDelazifying(); if (fun->compartment() == cx->compartment() && - lazy->sourceObject() && !lazy->maybeScript()) + lazy->sourceObject() && !lazy->maybeScript() && + !lazy->hasUncompiledEnclosingScript()) { MOZ_ASSERT(fun->isInterpretedLazy()); MOZ_ASSERT(lazy == fun->lazyScriptOrNull()); - - // Only compile lazy scripts that in fact escaped to script. We - // are iterating GC things here, so we might see lazy scripts - // whose enclosing scripts were not successfully compiled. - if (lazy->hasUncompiledEnclosingScript()) - continue; - if (!lazyFunctions.append(fun)) return false; } } // Create scripts for each lazy function, updating the list of functions to // process with any newly exposed inner functions in created scripts. // A function cannot be delazified until its outer script exists.