Bug 988383 - Part 3: Replace AutoPushJSContext in nsGlobalWindow::DefineArgumentsProperty. r=bholley

This commit is contained in:
Bob Owen 2014-03-28 11:42:13 +00:00
parent 154e6b8187
commit d77698f45d

View File

@ -3278,11 +3278,10 @@ nsGlobalWindow::DefineArgumentsProperty(nsIArray *aArguments)
MOZ_ASSERT(!mIsModalContentWindow); // Handled separately.
nsIScriptContext *ctx = GetOuterWindowInternal()->mContext;
NS_ENSURE_TRUE(aArguments && ctx, NS_ERROR_NOT_INITIALIZED);
AutoPushJSContext cx(ctx->GetNativeContext());
NS_ENSURE_TRUE(cx, NS_ERROR_NOT_INITIALIZED);
AutoJSContext cx;
JS::Rooted<JSObject*> obj(cx, GetWrapperPreserveColor());
return GetContextInternal()->SetProperty(obj, "arguments", aArguments);
return ctx->SetProperty(obj, "arguments", aArguments);
}
//*****************************************************************************