Backed out changeset aad183efb09a (bug 1303754) for regressions.

This commit is contained in:
Jan de Mooij 2016-09-23 09:50:47 +02:00
parent 55b62c4ff9
commit ff16d58af3

View File

@ -715,10 +715,16 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo,
// The script wasn't in the cache , so compile it now.
LOG(("Slow loading %s\n", nativePath.get()));
// Note - if mReuseLoaderGlobal is true, then we can't do lazy source,
// because we compile things as functions (rather than script), and lazy
// source isn't supported in that configuration. That's ok though,
// because we only do mReuseLoaderGlobal on b2g, where we invoke
// setDiscardSource(true) on the entire global.
CompileOptions options(cx);
options.setNoScriptRval(mReuseLoaderGlobal ? false : true)
.setVersion(JSVERSION_LATEST)
.setFileAndLine(nativePath.get(), 1);
.setFileAndLine(nativePath.get(), 1)
.setSourceIsLazy(!mReuseLoaderGlobal);
if (realFile) {
#ifdef HAVE_PR_MEMMAP