Bug 1478081 - avoid accessing null pointer; r=valentin
authorLiang-Heng Chen <xeonchen@gmail.com>
Tue, 24 Jul 2018 21:03:03 +0000
changeset 483153 0b9c0b211eb3
parent 483152 e56525462fdb
child 483154 2062a23f0e5a
child 483410 64ff37be9d0e
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1478081
milestone63.0a1
first release with
nightly linux32
0b9c0b211eb3 / 63.0a1 / 20180725103029 / files
nightly linux64
0b9c0b211eb3 / 63.0a1 / 20180725103029 / files
nightly mac
0b9c0b211eb3 / 63.0a1 / 20180725103029 / files
nightly win32
0b9c0b211eb3 / 63.0a1 / 20180725103029 / files
nightly win64
0b9c0b211eb3 / 63.0a1 / 20180725103029 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1478081 - avoid accessing null pointer; r=valentin Differential Revision: https://phabricator.services.mozilla.com/D2336
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2691,18 +2691,20 @@ HttpChannelChild::ContinueAsyncOpen()
   // which changes on every new load or navigation.
   uint64_t contentWindowId = 0;
   TimeStamp navigationStartTimeStamp;
   if (tabChild) {
     MOZ_ASSERT(tabChild->WebNavigation());
     nsCOMPtr<nsIDocument> document = tabChild->GetDocument();
     if (document) {
       contentWindowId = document->InnerWindowID();
-      navigationStartTimeStamp =
-        document->GetNavigationTiming()->GetNavigationStartTimeStamp();
+      nsDOMNavigationTiming* navigationTiming = document->GetNavigationTiming();
+      if (navigationTiming) {
+        navigationStartTimeStamp = navigationTiming->GetNavigationStartTimeStamp();
+      }
       mTopLevelOuterContentWindowId = document->OuterWindowID();
     }
   }
   SetTopLevelContentWindowId(contentWindowId);
 
   HttpChannelOpenArgs openArgs;
   // No access to HttpChannelOpenArgs members, but they each have a
   // function with the struct name that returns a ref.