Bug 1052052 - Convert AutoJSContext to AutoJSAPI. r=gabor

With this change, the only cx push left in the tree happens inside of AutoJSAPI. \o/
This commit is contained in:
Bobby Holley 2014-08-14 12:54:37 -07:00
parent e5da39b71b
commit 2807cea4b6
2 changed files with 3 additions and 3 deletions

View File

@ -465,8 +465,8 @@ AutoJSContext::Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
}
if (!mCx) {
mCx = xpc->GetSafeJSContext();
mPusher.emplace(mCx);
mJSAPI.Init();
mCx = mJSAPI.cx();
}
}

View File

@ -299,7 +299,7 @@ protected:
void Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
JSContext* mCx;
Maybe<dom::danger::AutoCxPusher> mPusher;
dom::AutoJSAPI mJSAPI;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};