Backed out changeset 1d87b1dc4ce2 (bug 1272697) for failing mochitest test_interfaces.html for 'ByteLengthQueuingStrategy' and wpts, e.g. general.dedicatedworker.html. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 28 Jul 2017 20:20:50 +0200
changeset 422850 9bf3949a7ae8577007f7692cdb9beb3bc85fae8b
parent 422849 a85c954dfda4a99af6de33828b129ba962fc752f
child 422851 ec666e910442ae55686160c1bd0c93b00a08dead
child 422955 453457533c95bf69b499607c050c8349c1d62fe8
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1272697
milestone56.0a1
backs out1d87b1dc4ce28594ec0775a3ac844ec104d5d6a0
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 1d87b1dc4ce2 (bug 1272697) for failing mochitest test_interfaces.html for 'ByteLengthQueuingStrategy' and wpts, e.g. general.dedicatedworker.html. r=backout on a CLOSED TREE
dom/base/nsFrameMessageManager.cpp
dom/bindings/BindingUtils.h
dom/ipc/ContentPrefs.cpp
dom/workers/WorkerScope.cpp
ipc/testshell/XPCShellEnvironment.cpp
js/src/jsapi.cpp
js/src/jsapi.h
js/src/shell/js.cpp
js/xpconnect/loader/mozJSComponentLoader.cpp
js/xpconnect/src/Sandbox.cpp
js/xpconnect/src/XPCJSContext.cpp
js/xpconnect/src/XPCShellImpl.cpp
js/xpconnect/src/XPCWrappedNative.cpp
js/xpconnect/src/xpcpublic.h
modules/libpref/init/all.js
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -1708,20 +1708,16 @@ nsMessageManagerScriptExecutor::InitChil
   JS::CompartmentOptions options;
   options.creationOptions().setSystemZone();
   options.behaviors().setVersion(JSVERSION_LATEST);
 
   if (xpc::SharedMemoryEnabled()) {
     options.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
   }
 
-  if (xpc::DOMStreamsEnabled()) {
-    options.creationOptions().setStreamsEnabled(true);
-  }
-
   nsCOMPtr<nsIXPConnectJSObjectHolder> globalHolder;
   nsresult rv =
     xpc->InitClassesWithNewWrappedGlobal(cx, aScope, mPrincipal,
                                          flags, options,
                                          getter_AddRefs(globalHolder));
   NS_ENSURE_SUCCESS(rv, false);
 
   mGlobal = globalHolder->GetJSObject();
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -3101,19 +3101,16 @@ CreateGlobal(JSContext* aCx, T* aNative,
              const JSClass* aClass, JS::CompartmentOptions& aOptions,
              JSPrincipals* aPrincipal, bool aInitStandardClasses,
              JS::MutableHandle<JSObject*> aGlobal)
 {
   aOptions.creationOptions().setTrace(CreateGlobalOptions<T>::TraceGlobal);
   if (xpc::SharedMemoryEnabled()) {
     aOptions.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
   }
-  if (xpc::DOMStreamsEnabled()) {
-    aOptions.creationOptions().setStreamsEnabled(true);
-  }
 
   aGlobal.set(JS_NewGlobalObject(aCx, aClass, aPrincipal,
                                  JS::DontFireOnNewGlobalHook, aOptions));
   if (!aGlobal) {
     NS_WARNING("Failed to create global");
     return false;
   }
 
--- a/dom/ipc/ContentPrefs.cpp
+++ b/dom/ipc/ContentPrefs.cpp
@@ -53,17 +53,16 @@ const char* mozilla::dom::ContentPrefs::
   "dom.ipc.processPriorityManager.backgroundGracePeriodMS",
   "dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS",
   "dom.max_chrome_script_run_time",
   "dom.max_script_run_time",
   "dom.mozBrowserFramesEnabled",
   "dom.performance.enable_notify_performance_timing",
   "dom.performance.enable_user_timing_logging",
   "dom.storage.testing",
-  "dom.streams.enabled",
   "dom.url.encode_decode_hash",
   "dom.url.getters_decode_hash",
   "dom.use_watchdog",
   "dom.vibrator.enabled",
   "dom.vibrator.max_vibrate_list_len",
   "dom.vibrator.max_vibrate_ms",
   "dom.webcomponents.customelements.enabled",
   "dom.webcomponents.enabled",
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -540,21 +540,19 @@ DedicatedWorkerGlobalScope::WrapGlobalOb
   const bool extraWarnings = usesSystemPrincipal &&
                              xpc::ExtraWarningsForSystemJS();
 
   JS::CompartmentBehaviors& behaviors = options.behaviors();
   behaviors.setDiscardSource(discardSource)
            .extraWarningsOverride().set(extraWarnings);
 
   const bool sharedMemoryEnabled = xpc::SharedMemoryEnabled();
-  const bool domStreamsEnabled = xpc::DOMStreamsEnabled();
 
   JS::CompartmentCreationOptions& creationOptions = options.creationOptions();
   creationOptions.setSharedMemoryAndAtomicsEnabled(sharedMemoryEnabled);
-  creationOptions.setStreamsEnabled(domStreamsEnabled);
 
   return DedicatedWorkerGlobalScopeBinding::Wrap(aCx, this, this,
                                                  options,
                                                  GetWorkerPrincipal(),
                                                  true, aReflector);
 }
 
 void
--- a/ipc/testshell/XPCShellEnvironment.cpp
+++ b/ipc/testshell/XPCShellEnvironment.cpp
@@ -450,18 +450,16 @@ XPCShellEnvironment::Init()
         return false;
     }
 
     JS::CompartmentOptions options;
     options.creationOptions().setSystemZone();
     options.behaviors().setVersion(JSVERSION_LATEST);
     if (xpc::SharedMemoryEnabled())
         options.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
-    if (xpc::DOMStreamsEnabled())
-        options.creationOptions().setStreamsEnabled(true);
 
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     rv = xpc->InitClassesWithNewWrappedGlobal(cx,
                                               static_cast<nsIGlobalObject *>(backstagePass),
                                               principal, 0,
                                               options,
                                               getter_AddRefs(holder));
     if (NS_FAILED(rv)) {
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1892,35 +1892,16 @@ JS::CompartmentCreationOptions&
 JS::CompartmentCreationOptions::setSharedMemoryAndAtomicsEnabled(bool flag)
 {
 #if defined(ENABLE_SHARED_ARRAY_BUFFER)
     sharedMemoryAndAtomics_ = flag;
 #endif
     return *this;
 }
 
-bool
-JS::CompartmentCreationOptions::getStreamsEnabled() const
-{
-#if defined(ENABLE_STREAMS)
-    return streamsEnabled_;
-#else
-    return false;
-#endif
-}
-
-JS::CompartmentCreationOptions&
-JS::CompartmentCreationOptions::setStreamsEnabled(bool flag)
-{
-#if defined(ENABLE_STREAMS)
-    streamsEnabled_ = flag;
-#endif
-    return *this;
-}
-
 JS::CompartmentBehaviors&
 JS::CompartmentBehaviorsRef(JSCompartment* compartment)
 {
     return compartment->behaviors();
 }
 
 JS::CompartmentBehaviors&
 JS::CompartmentBehaviorsRef(JSObject* obj)
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -2320,17 +2320,16 @@ class JS_PUBLIC_API(CompartmentCreationO
         zoneSpec_(NewZoneInSystemZoneGroup),
         zonePointer_(nullptr),
         invisibleToDebugger_(false),
         mergeable_(false),
         preserveJitCode_(false),
         cloneSingletons_(false),
         experimentalNumberFormatFormatToPartsEnabled_(false),
         sharedMemoryAndAtomics_(false),
-        streamsEnabled_(false),
         secureContext_(false)
     {}
 
     // A null add-on ID means that the compartment is not associated with an
     // add-on.
     JSAddonId* addonIdOrNull() const { return addonId_; }
     CompartmentCreationOptions& setAddonId(JSAddonId* id) {
         addonId_ = id;
@@ -2404,19 +2403,16 @@ class JS_PUBLIC_API(CompartmentCreationO
     CompartmentCreationOptions& setExperimentalNumberFormatFormatToPartsEnabled(bool flag) {
         experimentalNumberFormatFormatToPartsEnabled_ = flag;
         return *this;
     }
 
     bool getSharedMemoryAndAtomicsEnabled() const;
     CompartmentCreationOptions& setSharedMemoryAndAtomicsEnabled(bool flag);
 
-    bool getStreamsEnabled() const;
-    CompartmentCreationOptions& setStreamsEnabled(bool flag);
-
     // This flag doesn't affect JS engine behavior.  It is used by Gecko to
     // mark whether content windows and workers are "Secure Context"s. See
     // https://w3c.github.io/webappsec-secure-contexts/
     // https://bugzilla.mozilla.org/show_bug.cgi?id=1162772#c34
     bool secureContext() const { return secureContext_; }
     CompartmentCreationOptions& setSecureContext(bool flag) {
         secureContext_ = flag;
         return *this;
@@ -2428,17 +2424,16 @@ class JS_PUBLIC_API(CompartmentCreationO
     ZoneSpecifier zoneSpec_;
     void* zonePointer_; // Per zoneSpec_, either a Zone, ZoneGroup, or null.
     bool invisibleToDebugger_;
     bool mergeable_;
     bool preserveJitCode_;
     bool cloneSingletons_;
     bool experimentalNumberFormatFormatToPartsEnabled_;
     bool sharedMemoryAndAtomics_;
-    bool streamsEnabled_;
     bool secureContext_;
 };
 
 /**
  * CompartmentBehaviors specifies behaviors of a compartment that can be
  * changed after the compartment's been created.
  */
 class JS_PUBLIC_API(CompartmentBehaviors)
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -260,17 +260,16 @@ static bool enableDisassemblyDumps = fal
 static bool offthreadCompilation = false;
 static bool enableBaseline = false;
 static bool enableIon = false;
 static bool enableAsmJS = false;
 static bool enableWasm = false;
 static bool enableNativeRegExp = false;
 static bool enableUnboxedArrays = false;
 static bool enableSharedMemory = SHARED_MEMORY_DEFAULT;
-static bool enableStreams = true;
 static bool enableWasmAlwaysBaseline = false;
 static bool enableAsyncStacks = false;
 #ifdef JS_GC_ZEAL
 static uint32_t gZealBits = 0;
 static uint32_t gZealFrequency = 0;
 #endif
 static bool printTiming = false;
 static const char* jsCacheDir = nullptr;
@@ -3142,17 +3141,16 @@ static const JSClass sandbox_class = {
     &sandbox_classOps
 };
 
 static void
 SetStandardCompartmentOptions(JS::CompartmentOptions& options)
 {
     options.behaviors().setVersion(JSVERSION_DEFAULT);
     options.creationOptions().setSharedMemoryAndAtomicsEnabled(enableSharedMemory);
-    options.creationOptions().setStreamsEnabled(enableStreams);
 }
 
 static JSObject*
 NewSandbox(JSContext* cx, bool lazy)
 {
     JS::CompartmentOptions options;
     SetStandardCompartmentOptions(options);
     RootedObject obj(cx, JS_NewGlobalObject(cx, &sandbox_class, nullptr,
@@ -8027,27 +8025,16 @@ SetContextOptions(JSContext* cx, const O
             enableSharedMemory = false;
         else if (strcmp(str, "on") == 0)
             enableSharedMemory = true;
         else
             return OptionFailure("shared-memory", str);
     }
 #endif
 
-#ifdef ENABLE_STREAMS
-    if (const char* str = op.getStringOption("streams")) {
-        if (strcmp(str, "off") == 0)
-            enableStreams = false;
-        else if (strcmp(str, "on") == 0)
-            enableStreams = true;
-        else
-            return OptionFailure("streams", str);
-    }
-#endif
-
 #if defined(JS_CODEGEN_ARM)
     if (const char* str = op.getStringOption("arm-hwcap"))
         jit::ParseARMHwCapFlags(str);
 
     int32_t fill = op.getIntOption("arm-asm-nop-fill");
     if (fill >= 0)
         jit::Assembler::NopFill = fill;
 
@@ -8322,22 +8309,16 @@ main(int argc, char** argv, char** envp)
                                "SharedArrayBuffer and Atomics "
 #  if SHARED_MEMORY_DEFAULT
                                "(default: on, off to disable)"
 #  else
                                "(default: off, on to enable)"
 #  endif
             )
 #endif
-#ifdef ENABLE_STREAMS
-        || !op.addStringOption('\0', "streams", "on/off",
-                               "WHATWG Streams "
-                               "(default: on, off to disable)"
-            )
-#endif
         || !op.addStringOption('\0', "cache-ir-stubs", "on/off",
                                "Use CacheIR stubs (default: on, off to disable)")
         || !op.addStringOption('\0', "ion-shared-stubs", "on/off",
                                "Use shared stubs (default: on, off to disable)")
         || !op.addStringOption('\0', "ion-scalar-replacement", "on/off",
                                "Scalar Replacement (default: on, off to disable)")
         || !op.addStringOption('\0', "ion-gvn", "[mode]",
                                "Specify Ion global value numbering:\n"
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -468,19 +468,16 @@ mozJSComponentLoader::CreateLoaderGlobal
            .setSystemZone()
            .setAddonId(aAddonID);
 
     options.behaviors().setVersion(JSVERSION_LATEST);
 
     if (xpc::SharedMemoryEnabled())
         options.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
 
-    if (xpc::DOMStreamsEnabled())
-        options.creationOptions().setStreamsEnabled(true);
-
     // Defer firing OnNewGlobalObject until after the __URI__ property has
     // been defined so the JS debugger can tell what module the global is
     // for
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     rv = nsXPConnect::XPConnect()->
         InitClassesWithNewWrappedGlobal(aCx,
                                         static_cast<nsIGlobalObject*>(backstagePass),
                                         nsContentUtils::GetSystemPrincipal(),
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -1067,19 +1067,16 @@ xpc::CreateSandboxObject(JSContext* cx, 
 
     // XXXjwatt: Consider whether/when sandboxes should be able to see
     // [SecureContext] API (bug 1273687).  In that case we'd call
     // creationOptions.setSecureContext(true).
 
     if (xpc::SharedMemoryEnabled())
         creationOptions.setSharedMemoryAndAtomicsEnabled(true);
 
-    if (xpc::DOMStreamsEnabled())
-        creationOptions.setStreamsEnabled(true);
-
     if (options.sameZoneAs)
         creationOptions.setExistingZone(js::UncheckedUnwrap(options.sameZoneAs));
     else if (options.freshZone)
         creationOptions.setNewZoneInSystemZoneGroup();
     else
         creationOptions.setSystemZone();
 
     creationOptions.setInvisibleToDebugger(options.invisibleToDebugger)
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -594,21 +594,16 @@ bool xpc::ExtraWarningsForSystemJS() { r
 bool xpc::ExtraWarningsForSystemJS() { return false; }
 #endif
 
 static mozilla::Atomic<bool> sSharedMemoryEnabled(false);
 
 bool
 xpc::SharedMemoryEnabled() { return sSharedMemoryEnabled; }
 
-static mozilla::Atomic<bool> sDOMStreamsEnabled(false);
-
-bool
-xpc::DOMStreamsEnabled() { return sDOMStreamsEnabled; }
-
 static void
 ReloadPrefsCallback(const char* pref, void* data)
 {
     XPCJSContext* xpccx = static_cast<XPCJSContext*>(data);
     JSContext* cx = xpccx->Context();
 
     bool safeMode = false;
     nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
@@ -648,17 +643,16 @@ ReloadPrefsCallback(const char* pref, vo
     bool dumpStackOnDebuggeeWouldRun = Preferences::GetBool(JS_OPTIONS_DOT_STR
                                                             "dump_stack_on_debuggee_would_run");
 
     bool werror = Preferences::GetBool(JS_OPTIONS_DOT_STR "werror");
 
     bool extraWarnings = Preferences::GetBool(JS_OPTIONS_DOT_STR "strict");
 
     sSharedMemoryEnabled = Preferences::GetBool(JS_OPTIONS_DOT_STR "shared_memory");
-    sDOMStreamsEnabled = Preferences::GetBool("dom.streams.enabled");
 
 #ifdef DEBUG
     sExtraWarningsForSystemJS = Preferences::GetBool(JS_OPTIONS_DOT_STR "strict.debug");
 #endif
 
 #ifdef JS_GC_ZEAL
     int32_t zeal = Preferences::GetInt(JS_OPTIONS_DOT_STR "gczeal", -1);
     int32_t zeal_frequency =
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1430,18 +1430,16 @@ XRE_XPCShellMain(int argc, char** argv, 
         }
 
         // Make the default XPCShell global use a fresh zone (rather than the
         // System Zone) to improve cross-zone test coverage.
         JS::CompartmentOptions options;
         options.creationOptions().setNewZoneInSystemZoneGroup();
         if (xpc::SharedMemoryEnabled())
             options.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
-        if (xpc::DOMStreamsEnabled())
-            options.creationOptions().setStreamsEnabled(true);
         options.behaviors().setVersion(JSVERSION_LATEST);
         nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
         rv = nsXPConnect::XPConnect()->
             InitClassesWithNewWrappedGlobal(cx,
                                             static_cast<nsIGlobalObject*>(backstagePass),
                                             systemprincipal,
                                             0,
                                             options,
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -175,18 +175,16 @@ XPCWrappedNative::WrapNewGlobal(xpcObjec
     // Finally, we get to the JSClass.
     const JSClass* clasp = scrWrapper->GetJSClass();
     MOZ_ASSERT(clasp->flags & JSCLASS_IS_GLOBAL);
 
     // Create the global.
     aOptions.creationOptions().setTrace(XPCWrappedNative::Trace);
     if (xpc::SharedMemoryEnabled())
         aOptions.creationOptions().setSharedMemoryAndAtomicsEnabled(true);
-    if (xpc::DOMStreamsEnabled())
-        aOptions.creationOptions().setStreamsEnabled(true);
     RootedObject global(cx, xpc::CreateGlobalObject(cx, clasp, principal, aOptions));
     if (!global)
         return NS_ERROR_FAILURE;
     XPCWrappedNativeScope* scope = CompartmentPrivate::Get(global)->scope;
 
     // Immediately enter the global's compartment, so that everything else we
     // create ends up there.
     JSAutoCompartment ac(cx, global);
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -479,19 +479,16 @@ SimulateActivityCallback(bool aActive);
 // racey.
 bool
 ShouldDiscardSystemSource();
 
 bool
 SharedMemoryEnabled();
 
 bool
-DOMStreamsEnabled();
-
-bool
 SetAddonInterposition(const nsACString& addonId, nsIAddonInterposition* interposition);
 
 bool
 AllowCPOWsInAddon(const nsACString& addonId, bool allow);
 
 bool
 ExtraWarningsForSystemJS();
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1475,19 +1475,16 @@ pref("javascript.options.mem.gc_max_empt
 
 pref("javascript.options.showInConsole", false);
 
 pref("javascript.options.shared_memory", true);
 
 pref("javascript.options.throw_on_debuggee_would_run", false);
 pref("javascript.options.dump_stack_on_debuggee_would_run", false);
 
-// Streams API
-pref("dom.streams.enabled", false);
-
 // advanced prefs
 pref("advanced.mailftp",                    false);
 pref("image.animation_mode",                "normal");
 
 // Same-origin policy for file URIs, "false" is traditional
 pref("security.fileuri.strict_origin_policy", true);
 
 // If this pref is true, prefs in the logging.config branch will be cleared on