Backed out 2 changesets (bug 1653659) for Mochitest failures in mochitest/events/test_focus_general.html. CLOSED TREE default tip
authorDorel Luca <dluca@mozilla.com>
Fri, 14 May 2021 21:45:58 +0300
changeset 579713 ef13365d8188c453af959b13198818f6dbffc833
parent 579712 fa037550d6e8fec6f99737cab6845e6288a8af8a
push id38464
push userdluca@mozilla.com
push dateFri, 14 May 2021 21:58:21 +0000
treeherdermozilla-central@ef13365d8188 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1653659
milestone90.0a1
backs out523e4bc2aa471f9f5b07bf244048d2dfe36e3337
fac526423ccba773bc67b27c513e6625803ecc02
first release with
nightly linux32
ef13365d8188 / 90.0a1 / 20210514215821 / files
nightly linux64
ef13365d8188 / 90.0a1 / 20210514215821 / files
nightly mac
ef13365d8188 / 90.0a1 / 20210514215821 / files
nightly win32
ef13365d8188 / 90.0a1 / 20210514215821 / files
nightly win64
ef13365d8188 / 90.0a1 / 20210514215821 / 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
Backed out 2 changesets (bug 1653659) for Mochitest failures in mochitest/events/test_focus_general.html. CLOSED TREE Backed out changeset 523e4bc2aa47 (bug 1653659) Backed out changeset fac526423ccb (bug 1653659)
build/mozconfig.wasm-sandboxing
extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp
toolkit/mozapps/installer/unify.py
--- a/build/mozconfig.wasm-sandboxing
+++ b/build/mozconfig.wasm-sandboxing
@@ -1,9 +1,9 @@
 # Tell the build system about bits to build sandboxed wasm libraries.
 case "$PERFHERDER_EXTRA_OPTIONS" in
 base-toolchains*)
     # Clang versions < 8.0 don't support wasm.
     ;;
 *)
-    export WASM_SANDBOXED_LIBRARIES=graphite,ogg,hunspell
+    export WASM_SANDBOXED_LIBRARIES=graphite,ogg
     ;;
 esac
--- a/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp
+++ b/extensions/spellcheck/hunspell/glue/RLBoxHunspell.cpp
@@ -12,32 +12,26 @@
 #include "mozHunspellRLBoxHost.h"
 
 using namespace rlbox;
 using namespace mozilla;
 
 // Helper function for allocating and copying nsAutoCString into sandbox
 static tainted_hunspell<char*> allocStrInSandbox(
     rlbox_sandbox_hunspell& aSandbox, const nsAutoCString& str) {
-  if (str.IsEmpty()) {
-    return nullptr;
-  }
   size_t size = str.Length() + 1;
   tainted_hunspell<char*> t_str = aSandbox.malloc_in_sandbox<char>(size);
   MOZ_RELEASE_ASSERT(t_str);
   rlbox::memcpy(aSandbox, t_str, str.get(), size);
   return t_str;
 }
 
 // Helper function for allocating and copying std::string into sandbox
 static tainted_hunspell<char*> allocStrInSandbox(
     rlbox_sandbox_hunspell& aSandbox, const std::string& str) {
-  if (str.empty()) {
-    return nullptr;
-  }
   size_t size = str.size() + 1;
   tainted_hunspell<char*> t_str = aSandbox.malloc_in_sandbox<char>(size);
   MOZ_RELEASE_ASSERT(t_str);
   rlbox::memcpy(aSandbox, t_str, str.c_str(), size);
   return t_str;
 }
 
 RLBoxHunspell::RLBoxHunspell(const nsAutoCString& affpath,
@@ -53,22 +47,18 @@ RLBoxHunspell::RLBoxHunspell(const nsAut
   const bool allow_stdio = false;
   mSandbox.create_sandbox(mozilla::ipc::GetSandboxedHunspellPath().get(),
                           external_loads_exist, allow_stdio);
 #else
   mSandbox.create_sandbox();
 #endif
 
   // Add the aff and dict files to allow list
-  if (!affpath.IsEmpty()) {
-    mozHunspellCallbacks::AllowFile(affpath);
-  }
-  if (!dpath.IsEmpty()) {
-    mozHunspellCallbacks::AllowFile(dpath);
-  }
+  mozHunspellCallbacks::AllowFile(affpath);
+  mozHunspellCallbacks::AllowFile(dpath);
 
   // Register callbacks
   mCreateFilemgr =
       mSandbox.register_callback(mozHunspellCallbacks::CreateFilemgr);
   mGetLine = mSandbox.register_callback(mozHunspellCallbacks::GetLine);
   mGetLineNum = mSandbox.register_callback(mozHunspellCallbacks::GetLineNum);
   mDestructFilemgr =
       mSandbox.register_callback(mozHunspellCallbacks::DestructFilemgr);
@@ -89,22 +79,18 @@ RLBoxHunspell::RLBoxHunspell(const nsAut
   tainted_hunspell<char*> t_dpath = allocStrInSandbox(mSandbox, dpath);
 
   // Create handle
   mHandle = mSandbox.invoke_sandbox_function(
       Hunspell_create, rlbox::sandbox_const_cast<const char*>(t_affpath),
       rlbox::sandbox_const_cast<const char*>(t_dpath));
   MOZ_RELEASE_ASSERT(mHandle);
 
-  if (t_dpath) {
-    mSandbox.free_in_sandbox(t_dpath);
-  }
-  if (t_affpath) {
-    mSandbox.free_in_sandbox(t_affpath);
-  }
+  mSandbox.free_in_sandbox(t_dpath);
+  mSandbox.free_in_sandbox(t_affpath);
 
   // Get dictionary encoding
   tainted_hunspell<char*> t_enc =
       mSandbox.invoke_sandbox_function(Hunspell_get_dic_encoding, mHandle);
   t_enc.copy_and_verify_string([&](std::unique_ptr<char[]> enc) {
     size_t len = std::strlen(enc.get());
     mDicEncoding = std::string(enc.get(), len);
   });
--- a/toolkit/mozapps/installer/unify.py
+++ b/toolkit/mozapps/installer/unify.py
@@ -27,17 +27,16 @@ from mozpack.unify import UnifiedBuildFi
 
 # At the moment, rlbox is not supported on aarch64, so we need to allow
 # the files to be missing on the aarch64 half of the build. This also
 # means the precomplete file doesn't match, and we want to keep the x86_64
 # version which contains the extra lines for the wasm libs.
 WASM_LIBS = (
     "Contents/MacOS/liboggwasm.dylib",
     "Contents/MacOS/libgraphitewasm.dylib",
-    "Contents/MacOS/libhunspellwasm.dylib",
 )
 
 
 class UnifiedBuildFinderWasmHack(UnifiedBuildFinder):
     def unify_file(self, path, file1, file2):
         if path in WASM_LIBS:
             # When this assert hits, it means rlbox is supported on aarch64,
             # and this override, as well as precomplete below, can be removed.