Backed out changeset aad183efb09a (bug 1303754) for regressions.
This commit is contained in:
@@ -715,10 +715,16 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo,
|
|||||||
// The script wasn't in the cache , so compile it now.
|
// The script wasn't in the cache , so compile it now.
|
||||||
LOG(("Slow loading %s\n", nativePath.get()));
|
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);
|
CompileOptions options(cx);
|
||||||
options.setNoScriptRval(mReuseLoaderGlobal ? false : true)
|
options.setNoScriptRval(mReuseLoaderGlobal ? false : true)
|
||||||
.setVersion(JSVERSION_LATEST)
|
.setVersion(JSVERSION_LATEST)
|
||||||
.setFileAndLine(nativePath.get(), 1);
|
.setFileAndLine(nativePath.get(), 1)
|
||||||
|
.setSourceIsLazy(!mReuseLoaderGlobal);
|
||||||
|
|
||||||
if (realFile) {
|
if (realFile) {
|
||||||
#ifdef HAVE_PR_MEMMAP
|
#ifdef HAVE_PR_MEMMAP
|
||||||
|
|||||||
Reference in New Issue
Block a user