Bug 1439013 - Fix assertion for real. r=me
authorEugen Sawin <esawin@mozilla.com>
Sat, 28 Apr 2018 01:24:31 +0200
changeset 416089 23d3d208fcaaeb67b79380d4b514f9785cc57a72
parent 416088 8db81ce4d3a29fa0f9f69b904d2868e3b954bf39
child 416090 ce1d5d55b9a4de3b1bff8cec17b2895a5b83e73a
push id102720
push useresawin@mozilla.com
push dateFri, 27 Apr 2018 23:26:53 +0000
treeherdermozilla-inbound@23d3d208fcaa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1439013
milestone61.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
Bug 1439013 - Fix assertion for real. r=me
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9589,19 +9589,19 @@ nsDocShell::InternalLoad(nsIURI* aURI,
       }
       // If we are a noopener load, we just hand the whole thing over to our
       // window.
       if (aFlags & INTERNAL_LOAD_FLAGS_NO_OPENER) {
         // Various asserts that we know to hold because NO_OPENER loads can only
         // happen for links.
         MOZ_ASSERT(!aLoadReplace);
         MOZ_ASSERT(aPrincipalToInherit == aTriggeringPrincipal);
-        MOZ_ASSERT((aFlags ^ INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED) ==
+        MOZ_ASSERT((aFlags & ~INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED) ==
                    INTERNAL_LOAD_FLAGS_NO_OPENER ||
-                   (aFlags ^ INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED) ==
+                   (aFlags & ~INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED) ==
                    (INTERNAL_LOAD_FLAGS_NO_OPENER |
                     INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER));
         MOZ_ASSERT(!aPostData);
         MOZ_ASSERT(!aHeadersData);
         // If OnLinkClickSync was invoked inside the onload handler, the load
         // type would be set to LOAD_NORMAL_REPLACE; otherwise it should be
         // LOAD_LINK.
         MOZ_ASSERT(aLoadType == LOAD_LINK ||