Bug 1160535 part 4 - Remove an assert in XDRInterpretedFunction that's now bogus. r=nbp

This commit is contained in:
Jan de Mooij 2015-05-07 11:26:35 +02:00
parent 84ba7e2a90
commit 86ce623495
3 changed files with 8 additions and 6 deletions

View File

@ -158,3 +158,7 @@ evaluate(code, {global:g1, compileAndGo: true, saveBytecode: {value: true}});
evaluate(code, {global:g2, loadBytecode: true});
gc();
assertEq(g2.f.toString(), res);
// Another relazification case.
var src = "function f() { return 3; }; f(); relazifyFunctions(); 4";
evalWithCache(src, {assertEqBytecode: true, assertEqResult: true});

View File

@ -553,11 +553,6 @@ js::XDRInterpretedFunction(XDRState<mode>* xdr, HandleObject enclosingScope, Han
firstword |= IsStarGenerator;
if (fun->isInterpretedLazy()) {
// This can only happen for re-lazified cloned functions, so this
// does not apply to any JSFunction produced by the parser, only to
// JSFunction created by the runtime.
MOZ_ASSERT(!fun->lazyScript()->maybeScriptUnbarriered());
// Encode a lazy script.
firstword |= IsLazy;
lazy = fun->lazyScript();

View File

@ -1141,7 +1141,10 @@ js::XDRLazyScript(XDRState<mode>* xdr, HandleObject enclosingScope, HandleScript
uint64_t packedFields;
if (mode == XDR_ENCODE) {
MOZ_ASSERT(!lazy->maybeScriptUnbarriered());
// Note: it's possible the LazyScript has a non-null script_ pointer
// to a JSScript. We don't encode it: we can just delazify the
// lazy script.
MOZ_ASSERT(fun == lazy->functionNonDelazifying());
begin = lazy->begin();