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 18:47:16 -07:00
parent 7c7704aa07
commit daf81110d8
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

@ -300,7 +300,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
};