From ba2c2e5301bb2d993984c62cdf2fd07b361e6bca Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 1 Mar 2018 14:35:14 -0500 Subject: Remove MOZ_MULET --- js/xpconnect/loader/mozJSComponentLoader.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'js/xpconnect/loader') diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index 95c214867..85591bc8a 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -306,14 +306,6 @@ mozJSComponentLoader::ReallyInit() mReuseLoaderGlobal = Preferences::GetBool("jsloader.reuseGlobal"); - // XXXkhuey B2G child processes have some sort of preferences race that - // results in getting the wrong value. - // But we don't want that on Firefox Mulet as it break most Firefox JSMs... - // Also disable on debug builds to break js components that rely on this. -#if defined(MOZ_B2G) && !defined(MOZ_MULET) && !defined(DEBUG) - mReuseLoaderGlobal = true; -#endif - nsCOMPtr secman = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID); if (!secman) -- cgit v1.2.3 From af300f36f11293c12f2ee01580fc749a7e114376 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 16 Mar 2018 11:35:57 +0100 Subject: Bug 755821: Function() should use the parser's argument parsing code --- js/xpconnect/loader/mozJSSubScriptLoader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/xpconnect/loader') diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.cpp b/js/xpconnect/loader/mozJSSubScriptLoader.cpp index 824e9ab9e..9c8908ea4 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp +++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp @@ -130,7 +130,9 @@ PrepareScript(nsIURI* uri, MutableHandleFunction function) { JS::CompileOptions options(cx); - options.setFileAndLine(uriStr, 1) + // Use line 0 to make the function body starts from line 1 when + // |reuseGlobal == true|. + options.setFileAndLine(uriStr, reuseGlobal ? 0 : 1) .setVersion(JSVERSION_LATEST); if (!charset.IsVoid()) { char16_t* scriptBuf = nullptr; -- cgit v1.2.3