Bug 834732 - Make SafeAutoJSContext actually push something. r=mrbkap

Currently it never does, because the SafeJSContext doesn't have an
nsIScriptContext behind it. :-(
This commit is contained in:
Bobby Holley 2013-02-13 00:22:26 +01:00
parent 863479340f
commit 9194f7a1d2

View File

@ -6855,9 +6855,7 @@ AutoJSContext::Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
if (!mCx) {
mCx = nsContentUtils::GetSafeJSContext();
// XXXbholley - This is totally wrong, but necessary to make this patch
// not change any behavior. We'll fix it in an upcoming patch.
bool result = mPusher.Push(mCx, nsCxPusher::REQUIRE_SCRIPT_CONTEXT);
bool result = mPusher.Push(mCx, nsCxPusher::ALWAYS_PUSH);
if (!result || !mCx) {
MOZ_CRASH();
}