Bug 748752 - nsNPAPIPlugin check for private browsing value will not work; r=josh

This commit is contained in:
Ehsan Akhgari 2012-04-25 11:56:40 -04:00
parent dc46ce0076
commit f5ab42c8d7

View File

@ -2137,7 +2137,8 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
case NPNVprivateModeBool: {
nsCOMPtr<nsIDocument> doc = GetDocumentFromNPP(npp);
nsCOMPtr<nsPIDOMWindow> domwindow = do_QueryInterface(doc);
NS_ENSURE_TRUE(doc, NPERR_GENERIC_ERROR);
nsCOMPtr<nsPIDOMWindow> domwindow = doc->GetWindow();
if (domwindow) {
nsCOMPtr<nsIDocShell> docShell = domwindow->GetDocShell();
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);