Bug 1352030 - Don't assert that a null docshell cannot be null; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 30 Mar 2017 07:45:18 -0400
changeset 350478 6c31bcdef3bb3b3bcff08a851188ea811ef47581
parent 350477 6b183e0bc3e384bd94a3244a40ff1645610511ca
child 350479 9a843c3e25dba462d925b71fd40344d53acaa9b0
push id88647
push usereakhgari@mozilla.com
push dateThu, 30 Mar 2017 14:37:52 +0000
treeherdermozilla-inbound@6c31bcdef3bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1352030
milestone55.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 1352030 - Don't assert that a null docshell cannot be null; r=baku
dom/base/Navigator.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1908,18 +1908,16 @@ Navigator::GetUserAgent(nsPIDOMWindowInn
   }
 
   CopyASCIItoUTF16(ua, aUserAgent);
 
   if (!aWindow) {
     return NS_OK;
   }
 
-  MOZ_ASSERT(aWindow->GetDocShell());
-
   // Copy the User-Agent header from the document channel which has already been
   // subject to UA overrides.
   nsCOMPtr<nsIDocument> doc = aWindow->GetExtantDoc();
   if (!doc) {
     return NS_OK;
   }
   nsCOMPtr<nsIHttpChannel> httpChannel =
     do_QueryInterface(doc->GetChannel());