зеркало из https://github.com/mozilla/gecko-dev.git
Bug 428672, patch by mrbkap@gmail.com, r+sr=jst, a=beltzner
This commit is contained in:
Родитель
98a7d6e165
Коммит
9d1febc304
|
@ -2561,6 +2561,14 @@ nsDocument::GetScriptGlobalObject() const
|
|||
do_QueryReferent(mDocumentContainer);
|
||||
if (requestor) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject = do_GetInterface(requestor);
|
||||
|
||||
// Our docshell's script global object is an outer window, but
|
||||
// our script global object is an inner window. Convert here.
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> pwin = do_QueryInterface(globalObject);
|
||||
NS_ASSERTION(pwin, "What kind of global object do we have?");
|
||||
|
||||
globalObject = do_QueryInterface(pwin->GetCurrentInnerWindow());
|
||||
return globalObject;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче