Bug 1514547 - No error should be returned when external protocol URLs are blocked in iframes, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 24 Jan 2019 20:05:03 +0100
changeset 515367 eac3071c276bbab564bfaa5f8c2df23ae3f3e453
parent 515366 c20e24b35432cc690994a7572d61fba51f8a3b24
child 515368 910e176da1f9597774356dacb6bca91cb68935d4
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1514547
milestone66.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 1514547 - No error should be returned when external protocol URLs are blocked in iframes, r=smaug
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9658,18 +9658,19 @@ nsresult nsDocShell::DoURILoad(nsDocShel
           nsCOMPtr<nsINode> loadingNode =
               mScriptGlobal->AsOuter()->GetFrameElementInternal();
           if (loadingNode) {
             popupBlocked = !PopupBlocker::CanShowPopupByPermission(
                 loadingNode->NodePrincipal());
           }
         }
 
+        // No error must be returned when iframes are blocked.
         if (popupBlocked) {
-          return NS_ERROR_UNKNOWN_PROTOCOL;
+          return NS_OK;
         }
       }
     }
 
     // Only allow view-source scheme in top-level docshells. view-source is
     // the only scheme to which this applies at the moment due to potential
     // timing attacks to read data from cross-origin iframes. If this widens
     // we should add a protocol flag for whether the scheme is allowed in