Bug 1439013 - Fix assertion for real. r=me
authorEugen Sawin <esawin@mozilla.com>
Sat, 28 Apr 2018 01:24:31 +0200
changeset 416161 23d3d208fcaaeb67b79380d4b514f9785cc57a72
parent 416160 8db81ce4d3a29fa0f9f69b904d2868e3b954bf39
child 416162 ce1d5d55b9a4de3b1bff8cec17b2895a5b83e73a
push id33917
push userapavel@mozilla.com
push dateSat, 28 Apr 2018 17:30:55 +0000
treeherdermozilla-central@08f68e2c892c [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 ||