Bug 868130 - Remove the lion's share of JSAutoRequests in gecko. r=gabor
There are still a handful that either are used with other runtimes, or that happen very early/late in cx the lifetime of various things where it doesn't necessarily make sense to have a cx on the stack. This should definitely ensure that we're not doing double-duty with the nsCxPusher change, though.
This commit is contained in:
@@ -1264,7 +1264,6 @@ _getstringidentifier(const NPUTF8* name)
|
||||
}
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
JSAutoRequest ar(cx);
|
||||
return doGetIdentifier(cx, name);
|
||||
}
|
||||
|
||||
@@ -1277,7 +1276,6 @@ _getstringidentifiers(const NPUTF8** names, int32_t nameCount,
|
||||
}
|
||||
|
||||
AutoSafeJSContext cx;
|
||||
JSAutoRequest ar(cx);
|
||||
|
||||
for (int32_t i = 0; i < nameCount; ++i) {
|
||||
if (names[i]) {
|
||||
@@ -1493,8 +1491,6 @@ _evaluate(NPP npp, NPObject* npobj, NPString *script, NPVariant *result)
|
||||
nsCOMPtr<nsIScriptContext> scx = GetScriptContextFromJSContext(cx);
|
||||
NS_ENSURE_TRUE(scx, false);
|
||||
|
||||
JSAutoRequest req(cx);
|
||||
|
||||
JS::Rooted<JSObject*> obj(cx, nsNPObjWrapper::GetNewOrUsed(npp, cx, npobj));
|
||||
|
||||
if (!obj) {
|
||||
|
||||
Reference in New Issue
Block a user