Bug 1160535 part 5 - Remove the now bogus !maybeScript check in CreateLazyScriptsForCompartment. r=shu

This commit is contained in:
Jan de Mooij 2015-05-07 11:26:37 +02:00
parent 86ce623495
commit ad170b2fe1

View File

@ -754,12 +754,15 @@ CreateLazyScriptsForCompartment(JSContext* cx)
{
AutoObjectVector lazyFunctions(cx);
// Find all live root 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.
// Find all live root lazy functions in the compartment: those 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.
//
// Some LazyScripts have a non-null |JSScript* script| pointer. We still
// want to delazify in that case: this pointer is weak so the JSScript
// could be destroyed at the next GC.
//
// Note that while we ideally iterate over LazyScripts, LazyScripts do not
// currently stand in 1-1 relation with JSScripts; JSFunctions with the
@ -779,9 +782,7 @@ CreateLazyScriptsForCompartment(JSContext* cx)
if (fun->isInterpretedLazy()) {
LazyScript* lazy = fun->lazyScriptOrNull();
if (lazy && lazy->sourceObject() && !lazy->maybeScript() &&
!lazy->hasUncompiledEnclosingScript())
{
if (lazy && lazy->sourceObject() && !lazy->hasUncompiledEnclosingScript()) {
if (!lazyFunctions.append(fun))
return false;
}