Bug 982909 - Consistently use inner window when calling OpenJS. r=jst, r=mrbkap

This commit is contained in:
Olli Pettay 2014-03-13 12:22:07 -04:00
parent 3d7c690f68
commit 185fc1eed0

View File

@ -1350,7 +1350,7 @@ nsHTMLDocument::Open(JSContext* /* unused */,
NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
"XOW should have caught this!");
nsCOMPtr<nsIDOMWindow> window = GetWindow();
nsCOMPtr<nsIDOMWindow> window = GetInnerWindow();
if (!window) {
rv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
return nullptr;