Bug 1294577 - Don't issue a warning in ThirdPartyUtil::IsThirdPartyWindow when encountering a window with a null principal; r=erahm
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 29 Sep 2016 15:46:14 -0400
changeset 315849 c0be513c03c8d04eb3a8fbe24bb11e3bbd01621f
parent 315848 7da9a83dea36a2b41d376ea782b9ace7afa6185d
child 315850 bca4534616adca94e6e9b5dd85f18919768e174a
push id82297
push usereakhgari@mozilla.com
push dateThu, 29 Sep 2016 23:51:26 +0000
treeherdermozilla-inbound@c0be513c03c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1294577
milestone52.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 1294577 - Don't issue a warning in ThirdPartyUtil::IsThirdPartyWindow when encountering a window with a null principal; r=erahm
dom/base/ThirdPartyUtil.cpp
--- a/dom/base/ThirdPartyUtil.cpp
+++ b/dom/base/ThirdPartyUtil.cpp
@@ -116,17 +116,18 @@ ThirdPartyUtil::IsThirdPartyWindow(mozID
   NS_ASSERTION(aResult, "null outparam pointer");
 
   bool result;
 
   // Get the URI of the window, and its base domain.
   nsresult rv;
   nsCOMPtr<nsIURI> currentURI;
   rv = GetURIFromWindow(aWindow, getter_AddRefs(currentURI));
-  NS_ENSURE_SUCCESS(rv, rv);
+  if (NS_FAILED(rv))
+    return rv;
 
   nsCString bottomDomain;
   rv = GetBaseDomain(currentURI, bottomDomain);
   if (NS_FAILED(rv))
     return rv;
 
   if (aURI) {
     // Determine whether aURI is foreign with respect to currentURI.