зеркало из https://github.com/mozilla/gecko-dev.git
Bug 605696 - Refuse to create location objects without an outer window. r=jst
--HG-- extra : transplant_source : 4%D9%ABJ%0A%03%E5%7D%C5%F1%3C%BDV%BB%E7%E0%CC%DFh%10
This commit is contained in:
Родитель
872fb7bab0
Коммит
0caa75a303
|
@ -7095,15 +7095,13 @@ nsLocationSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo = do_GetInterface(ds);
|
||||
|
||||
if (sgo) {
|
||||
JSObject *global = sgo->GetGlobalJSObject();
|
||||
|
||||
if (global) {
|
||||
*parentObj = global;
|
||||
}
|
||||
if (!sgo) {
|
||||
NS_WARNING("Refusing to create a location in the wrong scope because the "
|
||||
"docshell is being destroyed");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
*parentObj = sgo->GetGlobalJSObject();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче