Bug 1014553 - Part 2: Remove AutoPushJSContext in nsContentUtils::WrapNative. r=bholley

This commit is contained in:
Bob Owen 2014-05-23 09:04:44 +01:00
parent a404738391
commit f3d36cd0c8

View File

@ -5629,6 +5629,8 @@ nsContentUtils::WrapNative(JSContext *cx, nsISupports *native,
nsWrapperCache *cache, const nsIID* aIID,
JS::MutableHandle<JS::Value> vp, bool aAllowWrapping)
{
MOZ_ASSERT(cx == GetCurrentJSContext());
if (!native) {
vp.setNull();
@ -5648,8 +5650,7 @@ nsContentUtils::WrapNative(JSContext *cx, nsISupports *native,
nsresult rv = NS_OK;
JS::Rooted<JSObject*> scope(cx, JS::CurrentGlobalOrNull(cx));
AutoPushJSContext context(cx);
rv = sXPConnect->WrapNativeToJSVal(context, scope, native, cache, aIID,
rv = sXPConnect->WrapNativeToJSVal(cx, scope, native, cache, aIID,
aAllowWrapping, vp);
return rv;
}