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 315935 c0be513c03c8d04eb3a8fbe24bb11e3bbd01621f
parent 315934 7da9a83dea36a2b41d376ea782b9ace7afa6185d
child 315936 bca4534616adca94e6e9b5dd85f18919768e174a
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1294577
milestone52.0a1
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.