mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 681061 - Avoid compartment mismatch error when displaying a growl notification. r=mrbkap
This commit is contained in:
parent
b7beb63b85
commit
20a7be87b7
@ -79,6 +79,10 @@ GetWindowOfObserver(nsIObserver* aObserver)
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
JSAutoEnterCompartment ac;
|
||||
if (!ac.enter(cx, obj)) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
JSObject* global = JS_GetGlobalForObject(cx, obj);
|
||||
NS_ENSURE_TRUE(global, nsnull);
|
||||
|
Loading…
Reference in New Issue
Block a user