Bug 1420902 - Bail out of RemoteSizeShellTo if the docShell has gone away. r=mystor
authorMike Conley <mconley@mozilla.com>
Tue, 28 Nov 2017 10:56:51 -0500
changeset 453411 eb8c89d823a6036963332c14e878ff48292c5915
parent 453410 c913f802e71a5808c0d457c16e55bcfaa2f5b43a
child 453412 ecc116e85fb208529894051ae2c0d7f0420151b2
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs1420902
milestone59.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 1420902 - Bail out of RemoteSizeShellTo if the docShell has gone away. r=mystor MozReview-Commit-ID: 4X3bfSeHGiA
dom/ipc/TabChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -789,16 +789,18 @@ TabChild::DestroyBrowserWindow()
 }
 
 NS_IMETHODIMP
 TabChild::RemoteSizeShellTo(int32_t aWidth, int32_t aHeight,
                             int32_t aShellItemWidth, int32_t aShellItemHeight)
 {
   nsCOMPtr<nsIDocShell> ourDocShell = do_GetInterface(WebNavigation());
   nsCOMPtr<nsIBaseWindow> docShellAsWin(do_QueryInterface(ourDocShell));
+  NS_ENSURE_STATE(docShellAsWin);
+
   int32_t width, height;
   docShellAsWin->GetSize(&width, &height);
 
   uint32_t flags = 0;
   if (width == aWidth) {
     flags |= nsIEmbeddingSiteWindow::DIM_FLAGS_IGNORE_CX;
   }