mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 627954, part 1: take out unnecessary compartment hack (r=gal)
--HG-- extra : rebase_source : 471f500689b2b8a79386907b3071b27c1c67afbe
This commit is contained in:
parent
e1dbc198d0
commit
3cfb03a5ab
@ -2305,19 +2305,12 @@ nsJSContext::GetGlobalObject()
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
// NB: This AutoCrossCompartmentCall is only here to silence a warning. If
|
||||
// it fails, nothing bad will happen.
|
||||
ac.enterAndIgnoreErrors(mContext, global);
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo;
|
||||
nsISupports *priv =
|
||||
(nsISupports *)::JS_GetPrivate(mContext, global);
|
||||
nsISupports *priv = (nsISupports *)global->getPrivate();
|
||||
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> wrapped_native =
|
||||
do_QueryInterface(priv);
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo;
|
||||
if (wrapped_native) {
|
||||
// The global object is a XPConnect wrapped native, the native in
|
||||
// the wrapper might be the nsIScriptGlobalObject
|
||||
|
Loading…
Reference in New Issue
Block a user