Bug 627954, part 1: take out unnecessary compartment hack (r=gal)

--HG--
extra : rebase_source : 471f500689b2b8a79386907b3071b27c1c67afbe
This commit is contained in:
Luke Wagner 2011-02-01 15:45:46 -08:00
Родитель e1dbc198d0
Коммит 3cfb03a5ab
1 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -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