зеркало из https://github.com/mozilla/gecko-dev.git
Bug 627954, part 1: take out unnecessary compartment hack (r=gal)
--HG-- extra : rebase_source : 471f500689b2b8a79386907b3071b27c1c67afbe
This commit is contained in:
Родитель
e1dbc198d0
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче