Bug 1067340 follow-up: null check the inner window r=bustage
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 17 Sep 2014 18:31:26 -0400
changeset 230454 40efa924899c1612c41c0aafc6f2ce97547b80db
parent 230453 9a082ef1223af6141df14cdfeba22f1966da0bee
child 230455 6af00329904f6399a9eb6710cce64a51a5219134
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1067340
milestone35.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 1067340 follow-up: null check the inner window r=bustage Landed on a CLOSED TREE
content/base/src/nsCSPContext.cpp
--- a/content/base/src/nsCSPContext.cpp
+++ b/content/base/src/nsCSPContext.cpp
@@ -521,17 +521,17 @@ getInnerWindowID(nsIRequest* aRequest) {
 
   nsCOMPtr<nsPIDOMWindow> pwindow = do_QueryInterface(window);
   if (!pwindow) {
     return 0;
   }
 
   nsPIDOMWindow* inner = pwindow->IsInnerWindow() ? pwindow.get() : pwindow->GetCurrentInnerWindow();
 
-  return inner->WindowID();
+  return inner ? inner->WindowID() : 0;
 }
 
 NS_IMETHODIMP
 nsCSPContext::SetRequestContext(nsIURI* aSelfURI,
                                 nsIURI* aReferrer,
                                 nsIChannel* aChannel)
 {
   NS_PRECONDITION(aSelfURI || aChannel, "Need aSelfURI or aChannel to set the context properly");