Bug 1067340 - Don't use nsIDOMWindowUtils in the CSP code, because it's not meant to be used from C++; r=geekboy

This commit is contained in:
Ehsan Akhgari 2014-09-17 17:55:43 -04:00
parent 6c76365ab1
commit 8273a526d3

View File

@ -519,18 +519,14 @@ getInnerWindowID(nsIRequest* aRequest) {
return 0;
}
uint64_t id = 0;
nsCOMPtr<nsIDOMWindowUtils> du = do_GetInterface(window);
if (!du) {
nsCOMPtr<nsPIDOMWindow> pwindow = do_QueryInterface(window);
if (!pwindow) {
return 0;
}
rv = du->GetCurrentInnerWindowID(&id);
if (NS_FAILED(rv)) {
return 0;
}
nsPIDOMWindow* inner = pwindow->IsInnerWindow() ? pwindow.get() : pwindow->GetCurrentInnerWindow();
return id;
return inner->WindowID();
}
NS_IMETHODIMP