diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 592b3e61f27..f1be6e7f1d2 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -8293,6 +8293,14 @@ nsGlobalWindow::GetInterface(const nsIID & aIID, void **aSink) } } } + else if (aIID.Equals(NS_GET_IID(nsIDocShell))) { + FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED); + + nsCOMPtr docShell = do_QueryInterface(mDocShell); + if (docShell) { + docShell.forget(aSink); + } + } #ifdef NS_PRINTING else if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) { FORWARD_TO_OUTER(GetInterface, (aIID, aSink), NS_ERROR_NOT_INITIALIZED);