mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 21:33:43 +00:00
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:
parent
cff5b616df
commit
5bab27d516
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user