From 18fac862c5a88046ddfc4e18e517c54d90f388c1 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 2 Jul 2013 14:39:03 -0600 Subject: [PATCH] Bug 888104 - Reimplement Auto*JSContext in terms of AutoCxPusher. r=gabor --- js/xpconnect/src/nsCxPusher.cpp | 4 ++-- js/xpconnect/src/nsCxPusher.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/xpconnect/src/nsCxPusher.cpp b/js/xpconnect/src/nsCxPusher.cpp index b9bfdc68fa06..b1456b40e4b1 100644 --- a/js/xpconnect/src/nsCxPusher.cpp +++ b/js/xpconnect/src/nsCxPusher.cpp @@ -192,7 +192,7 @@ AutoJSContext::Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) if (!mCx) { mCx = xpc->GetSafeJSContext(); - mPusher.Push(mCx); + mPusher.construct(mCx); } } @@ -209,7 +209,7 @@ AutoSafeJSContext::AutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMP AutoPushJSContext::AutoPushJSContext(JSContext *aCx) : mCx(aCx) { if (mCx && mCx != nsXPConnect::XPConnect()->GetCurrentJSContext()) { - mPusher.Push(mCx); + mPusher.construct(mCx); } } diff --git a/js/xpconnect/src/nsCxPusher.h b/js/xpconnect/src/nsCxPusher.h index d98867a13bf5..b734f8f1eed1 100644 --- a/js/xpconnect/src/nsCxPusher.h +++ b/js/xpconnect/src/nsCxPusher.h @@ -109,7 +109,7 @@ private: void Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM); JSContext* mCx; - nsCxPusher mPusher; + Maybe mPusher; MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; @@ -137,7 +137,7 @@ public: * you're doing. */ class MOZ_STACK_CLASS AutoPushJSContext { - nsCxPusher mPusher; + Maybe mPusher; JSContext* mCx; public: