зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1037904 Part 2: Replace nsCxPusher in nsJSObjWrapper::NP_HasProperties. r=bholley
This commit is contained in:
Родитель
7979f73edf
Коммит
81394883a8
|
@ -700,11 +700,11 @@ bool
|
||||||
nsJSObjWrapper::NP_HasProperty(NPObject *npobj, NPIdentifier npid)
|
nsJSObjWrapper::NP_HasProperty(NPObject *npobj, NPIdentifier npid)
|
||||||
{
|
{
|
||||||
NPP npp = NPPStack::Peek();
|
NPP npp = NPPStack::Peek();
|
||||||
JSContext *cx = GetJSContext(npp);
|
dom::AutoJSAPI jsapi;
|
||||||
|
if (NS_WARN_IF(!jsapi.InitWithLegacyErrorReporting(GetGlobalObject(npp)))) {
|
||||||
if (!cx) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
JSContext *cx = jsapi.cx();
|
||||||
|
|
||||||
if (!npobj) {
|
if (!npobj) {
|
||||||
ThrowJSException(cx,
|
ThrowJSException(cx,
|
||||||
|
@ -716,8 +716,6 @@ nsJSObjWrapper::NP_HasProperty(NPObject *npobj, NPIdentifier npid)
|
||||||
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
nsJSObjWrapper *npjsobj = (nsJSObjWrapper *)npobj;
|
||||||
bool found, ok = false;
|
bool found, ok = false;
|
||||||
|
|
||||||
nsCxPusher pusher;
|
|
||||||
pusher.Push(cx);
|
|
||||||
AutoJSExceptionReporter reporter(cx);
|
AutoJSExceptionReporter reporter(cx);
|
||||||
JS::Rooted<JSObject*> jsobj(cx, npjsobj->mJSObj);
|
JS::Rooted<JSObject*> jsobj(cx, npjsobj->mJSObj);
|
||||||
JSAutoCompartment ac(cx, jsobj);
|
JSAutoCompartment ac(cx, jsobj);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче