Merge inbound to mozilla-central. a=merge
authorCsoregi Natalia <ncsoregi@mozilla.com>
Thu, 06 Dec 2018 11:25:51 +0200
changeset 505945 f7895b06b742
parent 505936 5ca5e911d32f (current diff)
parent 505944 b7b76a72997d (diff)
child 505946 7d2f3c71997c
child 505955 faf53bfff31e
child 505972 3f89cd6708a8
child 505982 10320b5096c2
push id10301
push userarchaeopteryx@coole-files.de
push dateThu, 06 Dec 2018 16:36:14 +0000
treeherdermozilla-beta@7d2f3c71997c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone65.0a1
first release with
nightly linux32
f7895b06b742 / 65.0a1 / 20181206092619 / files
nightly linux64
f7895b06b742 / 65.0a1 / 20181206092619 / files
nightly mac
f7895b06b742 / 65.0a1 / 20181206092619 / files
nightly win32
f7895b06b742 / 65.0a1 / 20181206092619 / files
nightly win64
f7895b06b742 / 65.0a1 / 20181206092619 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central. a=merge
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7426,17 +7426,17 @@ const gAccessibilityServiceIndicator = {
   },
 
   handleEvent({ key, type }) {
     if ((type === "keypress" && [" ", "Enter"].includes(key)) ||
          type === "click") {
       let a11yServicesSupportURL =
         Services.urlFormatter.formatURLPref("accessibility.support.url");
       // This is a known URL coming from trusted UI
-      gBrowser.selectedTab = gBrowser.addTrustedTab(a11yServicesSupportURL);
+      openTrustedLinkIn(a11yServicesSupportURL, "tab");
       Services.telemetry.scalarSet("a11y.indicator_acted_on", true);
     }
   },
 
   uninit() {
     Services.prefs.removeObserver("accessibility.indicator.enabled", this);
     Services.obs.removeObserver(this, "a11y-init-or-shutdown");
   },
--- a/browser/components/aboutconfig/test/browser/browser_search.js
+++ b/browser/components/aboutconfig/test/browser/browser_search.js
@@ -19,45 +19,57 @@ add_task(async function test_search() {
   await BrowserTestUtils.withNewTab({
     gBrowser,
     url: PAGE_URL,
   }, async browser => {
     let prefArray = Services.prefs.getChildList("");
 
     // Test page loaded with correct number of prefs.
     await ContentTask.spawn(browser, prefArray, aPrefArray => {
-      Assert.equal(content.document.getElementById("prefs").childElementCount,
-                   aPrefArray.length);
+      // The total number of preferences may change at any time because of
+      // operations running in the background, so we only test approximately.
+      // The change in count would be because of one or two added preferences,
+      // but we tolerate a difference of up to 50 preferences just to be safe.
+      // We want thousands of prefs instead of a few dozen that are filtered.
+      Assert.greater(content.document.getElementById("prefs").childElementCount,
+                     aPrefArray.length - 50);
 
-      // Test page search of "button" returns correct number of preferences.
+      // Filter a subset of preferences. The "browser.download." branch is
+      // chosen because it is very unlikely that its preferences would be
+      // modified by other code during the execution of this test.
       let search = content.document.getElementById("search");
-      search.value = "button   ";
+      search.value = "wser.down   ";
       search.focus();
     });
 
     EventUtils.sendKey("return");
     await ContentTask.spawn(browser, prefArray, aPrefArray => {
       let filteredPrefArray =
-          aPrefArray.filter(pref => pref.includes("button"));
+          aPrefArray.filter(pref => pref.includes("wser.down"));
       // Adding +1 to the list since button does not match an exact
       // preference name then a row is added for the user to add a
       // new button preference if desired
       Assert.equal(content.document.getElementById("prefs").childElementCount,
                    filteredPrefArray.length + 1);
 
       // Test empty search returns all preferences.
       let search = content.document.getElementById("search");
       search.value = "";
       search.focus();
     });
 
     EventUtils.sendKey("return");
     await ContentTask.spawn(browser, prefArray, aPrefArray => {
-      Assert.equal(content.document.getElementById("prefs").childElementCount,
-                   aPrefArray.length);
+      // The total number of preferences may change at any time because of
+      // operations running in the background, so we only test approximately.
+      // The change in count would be because of one or two added preferences,
+      // but we tolerate a difference of up to 50 preferences just to be safe.
+      // We want thousands of prefs instead of a few dozen that are filtered.
+      Assert.greater(content.document.getElementById("prefs").childElementCount,
+                     aPrefArray.length - 50);
 
       // Test invalid search returns no preferences.
       let search = content.document.getElementById("search");
       search.value = "aJunkValueasdf";
       search.focus();
     });
 
     EventUtils.sendKey("return");
--- a/browser/config/mozconfigs/win32/mingwclang
+++ b/browser/config/mozconfigs/win32/mingwclang
@@ -43,27 +43,22 @@ ac_add_options --disable-webrtc # Bug 13
 ac_add_options --disable-geckodriver # Bug 1489320
 
 # Find our toolchain
 HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
 HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
 CC="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang"
 CXX="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang++"
 CXXFLAGS="-fms-extensions"
-CPP="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang -E"
 AR=llvm-ar
 RANLIB=llvm-ranlib
 
 # For Stylo
 BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/lib/clang/8.0.0/include -I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include"
 
-# Since we use windres from binutils without the rest of tools (like cpp), we need to
-# explicitly specify clang as a preprocessor.
-WINDRES="i686-w64-mingw32-windres --preprocessor=\"$CPP -xc\" -DRC_INVOKED"
-
 # Bug 1471698 - Work around binutils corrupting mingw clang binaries.
 LDFLAGS="-Wl,-S"
 STRIP=/bin/true
 OBJCOPY=/bin/true
 
 # We want to make sure we use binutils and other binaries in the tooltool
 # package.
 mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
--- a/browser/config/mozconfigs/win64/mingwclang
+++ b/browser/config/mozconfigs/win64/mingwclang
@@ -43,27 +43,22 @@ ac_add_options --disable-webrtc # Bug 13
 ac_add_options --disable-geckodriver # Bug 1489320
 
 # Find our toolchain
 HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
 HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
 CC="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang"
 CXX="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang++"
 CXXFLAGS="-fms-extensions"
-CPP="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang -E"
 AR=llvm-ar
 RANLIB=llvm-ranlib
 
 # For Stylo
 BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/lib/clang/8.0.0/include -I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include"
 
-# Since we use windres from binutils without the rest of tools (like cpp), we need to
-# explicitly specify clang as a preprocessor.
-WINDRES="x86_64-w64-mingw32-windres --preprocessor=\"$CPP -xc\" -DRC_INVOKED"
-
 # Bug 1471698 - Work around binutils corrupting mingw clang binaries.
 LDFLAGS="-Wl,-S"
 STRIP=/bin/true
 OBJCOPY=/bin/true
 
 # We want to make sure we use binutils and other binaries in the tooltool
 # package.
 mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
--- a/build/build-clang/clang-trunk-mingw.json
+++ b/build/build-clang/clang-trunk-mingw.json
@@ -1,10 +1,10 @@
 {
-    "llvm_revision": "342383",
+    "llvm_revision": "348363",
     "stages": "3",
     "build_libcxx": true,
     "build_type": "Release",
     "assertions": false,
     "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
     "lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
--- a/js/src/builtin/Module.js
+++ b/js/src/builtin/Module.js
@@ -48,17 +48,17 @@ function ModuleGetExportedNames(exportSt
         _DefineDataProperty(exportedNames, namesCount++, e.exportName);
     }
 
     // Step 7
     let starExportEntries = module.starExportEntries;
     for (let i = 0; i < starExportEntries.length; i++) {
         let e = starExportEntries[i];
         let requestedModule = CallModuleResolveHook(module, e.moduleRequest,
-                                                    MODULE_STATUS_INSTANTIATING);
+                                                    MODULE_STATUS_UNINSTANTIATED);
         let starNames = callFunction(requestedModule.getExportedNames, requestedModule,
                                      exportStarSet);
         for (let j = 0; j < starNames.length; j++) {
             let n = starNames[j];
             if (n !== "default" && !callFunction(ArrayIncludes, exportedNames, n))
                 _DefineDataProperty(exportedNames, namesCount++, n);
         }
     }
new file mode 100644
--- /dev/null
+++ b/js/src/tests/non262/module/bug1488117-empty.js
@@ -0,0 +1,3 @@
+// |reftest| skip -- support file
+
+// Intentionally left empty.
new file mode 100644
--- /dev/null
+++ b/js/src/tests/non262/module/bug1488117-import-namespace.js
@@ -0,0 +1,3 @@
+// |reftest| skip -- support file
+
+import* as ns from "./bug1488117.js";
new file mode 100644
--- /dev/null
+++ b/js/src/tests/non262/module/bug1488117.js
@@ -0,0 +1,14 @@
+// |reftest| module
+
+// Load and instantiate "bug1488117-import-namespace.js". "bug1488117-import-namespace.js"
+// contains an |import*| request for the current module, which triggers GetModuleNamespace for
+// this module. GetModuleNamespace calls GetExportedNames on the current module, which in turn
+// resolves and calls GetExportedNames on all |export*| entries.
+// And that means HostResolveImportedModule is called for "bug1488117-empty.js" before
+// InnerModuleInstantiation for "bug1488117.js" has resolved that module file.
+
+import "./bug1488117-import-namespace.js";
+export* from "./bug1488117-empty.js";
+
+if (typeof reportCompare === "function")
+    reportCompare(0, 0);
--- a/taskcluster/scripts/misc/build-clang-trunk-mingw.sh
+++ b/taskcluster/scripts/misc/build-clang-trunk-mingw.sh
@@ -27,18 +27,19 @@ UPLOAD_DIR=$HOME/artifacts
 
 TOOLCHAIN_DIR=$WORKSPACE/moz-toolchain
 INSTALL_DIR=$TOOLCHAIN_DIR/build/stage3/clang
 CROSS_PREFIX_DIR=$INSTALL_DIR/$machine-w64-mingw32
 SRC_DIR=$TOOLCHAIN_DIR/src
 
 make_flags="-j$(nproc)"
 
-mingw_version=70860d945e6be713af352ee62820bccb653589c2
+mingw_version=d66350ea60d043a8992ada752040fc4ea48537c3
 libunwind_version=1f89d78bb488bc71cfdee8281fc0834e9fbe5dce
+llvm_mingw_version=53db1c3a4c9c81972b70556a5ba5cd6ccd8e6e7d
 
 binutils_version=2.27
 binutils_ext=bz2
 binutils_sha=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
 
 # This is default value of _WIN32_WINNT. Gecko configure script explicitly sets this,
 # so this is not used to build Gecko itself. We default to 0x600, which is Windows Vista.
 default_win32_winnt=0x600
@@ -59,16 +60,21 @@ prepare() {
   git checkout $mingw_version
   popd
 
   git clone https://github.com/llvm-mirror/libunwind.git
   pushd libunwind
   git checkout $libunwind_version
   popd
 
+  git clone https://github.com/mstorsjo/llvm-mingw.git
+  pushd llvm-mingw
+  git checkout $llvm_mingw_version
+  popd
+
   wget -c --progress=dot:mega ftp://ftp.gnu.org/gnu/binutils/binutils-$binutils_version.tar.$binutils_ext
   if [ "$(sha256sum binutils-$binutils_version.tar.$binutils_ext)" != "$binutils_sha  binutils-$binutils_version.tar.$binutils_ext" ];
   then
     echo Corrupted binutils archive
     exit 1
   fi
   tar -jxf binutils-$binutils_version.tar.$binutils_ext
 
@@ -263,32 +269,31 @@ build_libcxx() {
   # libc++.a depends on libunwind.a. Whild linker will automatically link
   # to libc++.a in C++ mode, it won't pick libunwind.a, requiring caller
   # to explicitly pass -lunwind. Wo work around that, we merge libunwind.a
   # into libc++.a.
   merge_libs $CROSS_PREFIX_DIR/lib/libc++.a $CROSS_PREFIX_DIR/lib/libunwind.a
   popd
 }
 
-build_windres() {
-  # we build whole binutils, but use only windres in our toolchain
+build_utils() {
   mkdir binutils
   pushd binutils
   $SRC_DIR/binutils-$binutils_version/configure --prefix=$INSTALL_DIR \
                                                 --disable-multilib \
                                                 --disable-nls \
                                                 --target=$machine-w64-mingw32
   make $make_flags
 
-  # Manually install only nm and windres
-  cp binutils/windres $INSTALL_DIR/bin/$machine-w64-mingw32-windres
+  # Manually install only nm
   cp binutils/nm-new $INSTALL_DIR/bin/$machine-w64-mingw32-nm
 
   pushd $INSTALL_DIR/bin/
   ln -s llvm-readobj $machine-w64-mingw32-readobj
+  ./clang $SRC_DIR/llvm-mingw/wrappers/windres-wrapper.c -O2 -Wl,-s -o $machine-w64-mingw32-windres
   popd
 
   popd
 }
 
 export PATH=$INSTALL_DIR/bin:$PATH
 
 prepare
@@ -303,17 +308,17 @@ cd build/build-clang
 set -x
 
 pushd $TOOLCHAIN_DIR/build
 
 install_wrappers
 build_mingw
 build_compiler_rt
 build_libcxx
-build_windres
+build_utils
 
 popd
 
 # Put a tarball in the artifacts dir
 mkdir -p $UPLOAD_DIR
 
 pushd $(dirname $INSTALL_DIR)
 rm -f clang/lib/libstdc++*
--- a/tools/tryselect/test/test_fuzzy.t
+++ b/tools/tryselect/test/test_fuzzy.t
@@ -9,32 +9,42 @@ Test fuzzy selector
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "test/foo-debug",
           "test/foo-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ ./mach try fuzzy $testargs -q "'bar"
   no tasks selected
   $ ./mach try fuzzy $testargs --full -q "'bar"
   Commit message:
   Fuzzy query='bar
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "test/bar-debug",
           "test/bar-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
 
 Test multiple selectors
 
   $ ./mach try fuzzy $testargs --full -q "'foo" -q "'bar"
   Commit message:
@@ -44,16 +54,21 @@ Test multiple selectors
   Calculated try_task_config.json:
   {
       "tasks": [
           "test/bar-debug",
           "test/bar-opt",
           "test/foo-debug",
           "test/foo-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
 
 Test templates
 
   $ ./mach try fuzzy --no-push --artifact -q "'foo"
   Commit message:
@@ -64,16 +79,19 @@ Test templates
   {
       "tasks": [
           "test/foo-debug",
           "test/foo-opt"
       ],
       "templates": {
           "artifact": {
               "enabled": "1"
+          },
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
           }
       },
       "version": 1
   }
   
   $ ./mach try fuzzy $testargs --env FOO=1 --env BAR=baz -q "'foo"
   Commit message:
   Fuzzy query='foo
@@ -83,14 +101,15 @@ Test templates
   {
       "tasks": [
           "test/foo-debug",
           "test/foo-opt"
       ],
       "templates": {
           "env": {
               "BAR": "baz",
-              "FOO": "1"
+              "FOO": "1",
+              "TRY_SELECTOR": "fuzzy"
           }
       },
       "version": 1
   }
   
--- a/tools/tryselect/test/test_message.t
+++ b/tools/tryselect/test/test_message.t
@@ -11,30 +11,40 @@ Test custom commit messages with fuzzy s
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "test/foo-debug",
           "test/foo-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ ./mach try fuzzy $testargs -q foo -m "Foobar: {msg}"
   Commit message:
   Foobar: Fuzzy query=foo
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "test/foo-debug",
           "test/foo-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ unset EDITOR
   $ ./mach try fuzzy $testargs -q foo -m > /dev/null 2>&1
   [2]
 
 
--- a/tools/tryselect/test/test_preset.t
+++ b/tools/tryselect/test/test_preset.t
@@ -71,58 +71,78 @@ Test preset with fuzzy subcommand
   Fuzzy query='baz
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "build-baz"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ ./mach try fuzzy $testargs --preset baz
   Commit message:
   Fuzzy query='baz
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "build-baz"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
 
   $ ./mach try fuzzy $testargs --preset baz -q "'foo"
   Commit message:
   Fuzzy query='foo&query='baz
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "build-baz",
           "test/foo-debug",
           "test/foo-opt"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ ./mach try $testargs --preset baz
   Commit message:
   Fuzzy query='baz
   
   Pushed via `mach try fuzzy`
   Calculated try_task_config.json:
   {
       "tasks": [
           "build-baz"
       ],
+      "templates": {
+          "env": {
+              "TRY_SELECTOR": "fuzzy"
+          }
+      },
       "version": 1
   }
   
   $ ./mach try fuzzy $testargs --list-presets
   baz: 'baz
   $ ./mach try fuzzy $testargs --edit-presets
   [try]
   foo = -b do -p linux -u mochitests -t none --tag foo