Bug 742944 - Part 2: Allow getInterface'ing an nsGlobalWindow to an nsIDocShell. r=bz

--HG--
extra : rebase_source : d753f06497e4b6859be45fd9fa4173ec18f0c2e5
This commit is contained in:
Justin Lebar 2012-06-12 18:01:24 -04:00
parent cc43cd9859
commit 879007e561

View File

@ -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<nsIDocShell> 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);