Merge inbound to mozilla-central. a=merge
authorOana Pop Rus <opoprus@mozilla.com>
Mon, 25 Feb 2019 18:38:05 +0200
changeset 518762 e376ef5bf4536d5c6670040ef28d218b806b91e9
parent 518759 80e4f0ce3dd4d428993e557f0a879b6da5b2f77c (current diff)
parent 518761 3f00b31e09d48bbd073f3b8c4fe7690c3dcdd469 (diff)
child 518766 0a69ff6e8daa8fae4645fc28e818e80003cc4898
child 518806 91514fccb8217878a323b99e2295569980d949a2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone67.0a1
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
Merge inbound to mozilla-central. a=merge
--- a/dom/security/nsContentSecurityManager.cpp
+++ b/dom/security/nsContentSecurityManager.cpp
@@ -999,20 +999,23 @@ nsContentSecurityManager::IsOriginPotent
   if (aPrincipal->GetIsNullPrincipal()) {
     return NS_OK;
   }
 
   MOZ_ASSERT(aPrincipal->GetIsCodebasePrincipal(),
              "Nobody is expected to call us with an nsIExpandedPrincipal");
 
   nsCOMPtr<nsIURI> uri;
-  aPrincipal->GetURI(getter_AddRefs(uri));
+  nsresult rv = aPrincipal->GetURI(getter_AddRefs(uri));
+  if (NS_FAILED(rv)) {
+    return NS_OK;
+  }
 
   nsAutoCString scheme;
-  nsresult rv = uri->GetScheme(scheme);
+  rv = uri->GetScheme(scheme);
   if (NS_FAILED(rv)) {
     return NS_OK;
   }
 
   // Blobs are expected to inherit their principal so we don't expect to have
   // a codebase principal with scheme 'blob' here.  We can't assert that though
   // since someone could mess with a non-blob URI to give it that scheme.
   NS_WARNING_ASSERTION(!scheme.EqualsLiteral("blob"),
--- a/toolkit/components/telemetry/tests/modules-test.cpp
+++ b/toolkit/components/telemetry/tests/modules-test.cpp
@@ -4,21 +4,24 @@
 /*
  * This source file is used to build different shared libraries:
  *
  *  - libmodules-test; it is automatically built by our build system (see the
  *    moz.build in the same directory as this file);
  *
  *  - testUnicodePDB32.dll and testUnicodePDB64.dll; they can be built by
  * compiling this source file using MSVC and setting the target name to be
- * "libmodμles", then renaming the resulting file: cl /Zi modules-test.cpp /link
- * /DLL /OUT:libmodμles.dll cp libmodμles.dll testUnicodePDB*ARCH*.dll
+ * "libmodμles", then renaming the resulting file:
+ *      cl /Os /Zi modules-test.cpp /LINK /DLL /OUT:libmodμles.dll \
+ *        /nodefaultlib /entry:nothing /opt:ref
+ *      copy libmodμles.dll testUnicodePDB*ARCH*.dll
  *
  *  - testNoPDB32.dll and testNoPDB64.dll; they can be built by compiling this
  *    file using MSVC, without enabling generation of a PDB:
- *      cl modules-test.cpp /DLL /OUT:testNoPDB*ARCH*.dll
+ *      cl /Os modules-test.cpp /LINK /DLL /OUT:testNoPDB*ARCH*.dll \
+ *        /nodefaultlib /entry:nothing
  *
  * Clearly, for testUnicodePDB and testNoPDB both a 32-bit and a 64-bit version
  * have to be compiled, using the 32-bit and 64-bit MSVC toolchains.
  *
  */
 
 void nothing() {}
new file mode 100755
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ecfff07036242e148566aa37a12e6b87bb2fc0e9
GIT binary patch
literal 1536
zc%1W%n!v!!z`(!)#Q*;@FzjG}00#!bU<DBK$?xK0*ur^MaR;N%S;dfy%wmOtqWtut
z#9W2s#Js%x5{0Bxg`(0th0Ht!7yn>|-29YOJzice6{s1yyAAGV-iqsi;oqC1do#dv
z444keOwIs_2e>jYq^x3MIBS|01GE1FgOUO_6Q2MB6Oh9M6%>GC28ISk7#}Fd22}u~
z84M75m>3cmVVYnRCLe`KJWya@kReAO4xm?(T2aCPi7%Mn;C@F~nV?scl30?+zz_o!
z0IOj^Rp$Ui2bklpQPFv$U<d+Op5kSI<a-$fAcmzC0Z6g|r#qG0Jg}GoBu&H87)ZSX
ToUc+<Rh5#IPG2vK0x|&r_-sh%
new file mode 100755
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a892a84315f9e61ade61918282c3d8075b252da0
GIT binary patch
literal 7168
zc%1E+ze~eF6vtmv6@S!HL@c;?imRa_qBs>>H$|~d8meh>*kF<?$qDM@Dk$iGAjL`C
zbP#pWKcKof=-|KL(9J<FX)@FfMG&g+KJfD1ec!v>yW^%?SUrX)0JI7F`~<j$8fj>b
zR~sL?iNjS_W%xQWUm0F08ZIe0Y|~LKqN%pcI4Mx#Y}>@JNp>+uET&Vrx3_yV_{Z37
z>dkn`ABOgExpq|az2f_2Lo0gv_qCVi0QB=HyiVFmsJ+7o>5<|I=o5pEnifllPr?uP
zBM`)rmzI1n^sp2hf}h@qgp)$oIIatulLqMYd<tOtC-a&hbGpNYp9=Ts?Y*tOh5&5H
zj;?YQ;7O|W;MWW^w3wD1YBDY8RS5p^3^vrw{^AypKZ3YE$B8nWfHd^{J$D~nZ_p3~
zK@bE%5ClOG1VNDhLHLI1J@w^<Wyggj>vJ(-{ld;f?kw4wKL0AqxoqzAV)x;oGLb10
zH+5gFp0o=+Gox5+&oE7OOrth;R8!%MnOg=|G-j2UEksx0)T9>W&aQ}DF*c2Y#q`HJ
Xle%(AF9d5u0z;7BrnA)zAT8qyR_Acd
--- a/toolkit/components/telemetry/tests/unit/test_ModulesPing.js
+++ b/toolkit/components/telemetry/tests/unit/test_ModulesPing.js
@@ -10,18 +10,35 @@ const {OS} = ChromeUtils.import("resourc
 const MAX_NAME_LENGTH = 64;
 
 // The following libraries (except libxul) are all built from the
 // toolkit/components/telemetry/tests/modules-test.cpp file, which contains
 // instructions on how to build them.
 const libModules = ctypes.libraryName("modules-test");
 const libUnicode = ctypes.libraryName("modμles-test");
 const libLongName = "lorem_ipsum_dolor_sit_amet_consectetur_adipiscing_elit_Fusce_sit_amet_tellus_non_magna_euismod_vestibulum_Vivamus_turpis_duis.dll";
-const libUnicodePDB = Services.appinfo.is64Bit ? "testUnicodePDB64.dll" : "testUnicodePDB32.dll";
-const libNoPDB = Services.appinfo.is64Bit ? "testNoPDB64.dll" : "testNoPDB32.dll";
+
+function chooseDLL(x86, x64, aarch64) {
+  let xpcomabi = Services.appinfo.XPCOMABI;
+  let cpu = xpcomabi.split("-")[0];
+  switch (cpu) {
+    case "aarch64": return aarch64;
+    case "x86_64": return x64;
+    case "x86": return x86;
+    // This case only happens on Android, which gets skipped below. The previous
+    // code was returning the x86 version when testing for arm.
+    case "arm": return x86;
+    default:
+      Assert.ok(false, "unexpected CPU type: " + cpu);
+      return x86;
+  }
+}
+
+const libUnicodePDB = chooseDLL("testUnicodePDB32.dll", "testUnicodePDB64.dll", "testUnicodePDBAArch64.dll");
+const libNoPDB = chooseDLL("testNoPDB32.dll", "testNoPDB64.dll", "testNoPDBAArch64.dll");
 const libxul = OS.Path.basename(OS.Constants.Path.libxul);
 
 const libModulesFile = do_get_file(libModules).path;
 const libUnicodeFile = OS.Path.join(OS.Path.dirname(libModulesFile), libUnicode);
 const libLongNameFile = OS.Path.join(OS.Path.dirname(libModulesFile), libLongName);
 const libUnicodePDBFile = do_get_file(libUnicodePDB).path;
 const libNoPDBFile = do_get_file(libNoPDB).path;
 
--- a/toolkit/components/telemetry/tests/unit/xpcshell.ini
+++ b/toolkit/components/telemetry/tests/unit/xpcshell.ini
@@ -9,16 +9,18 @@ support-files =
   dictionary.xpi
   engine.xml
   system.xpi
   restartless.xpi
   testUnicodePDB32.dll
   testNoPDB32.dll
   testUnicodePDB64.dll
   testNoPDB64.dll
+  testUnicodePDBAArch64.dll
+  testNoPDBAArch64.dll
   !/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
 generated-files =
   dictionary.xpi
   system.xpi
   restartless.xpi
 
 [test_GeckoView.js]
 skip-if = os == "android" # Disabled due to crashes (see bug 1331366)