mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
c7f9cb0697
commit
442be7263a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user