Bug 943373, part 1 - Use MOZ_THIS_IN_INITIALIZER_LIST in XPConnect. r=bholley

This commit is contained in:
Andrew McCreight 2013-12-10 08:07:20 -08:00
parent be2fa1b31a
commit 168f96fd5d
3 changed files with 2 additions and 7 deletions

View File

@ -2948,7 +2948,7 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect)
mVariantRoots(nullptr),
mWrappedJSRoots(nullptr),
mObjectHolderRoots(nullptr),
mWatchdogManager(new WatchdogManager(this)),
mWatchdogManager(new WatchdogManager(MOZ_THIS_IN_INITIALIZER_LIST())),
mJunkScope(nullptr),
mAsyncSnowWhiteFreer(new AsyncFreeSnowWhite())
{

View File

@ -339,7 +339,7 @@ nsXPCWrappedJS::nsXPCWrappedJS(JSContext* cx,
nsISupports* aOuter)
: mJSObj(aJSObj),
mClass(aClass),
mRoot(root ? root : this),
mRoot(root ? root : MOZ_THIS_IN_INITIALIZER_LIST()),
mNext(nullptr),
mOuter(root ? nullptr : aOuter)
{

View File

@ -248,11 +248,6 @@ inline JSObject* GetWNExpandoChain(JSObject *obj)
return JS_GetReservedSlot(obj, WN_XRAYEXPANDOCHAIN_SLOT).toObjectOrNull();
}
// We PROMISE to never screw this up.
#ifdef _MSC_VER
#pragma warning(disable : 4355) // OK to pass "this" in member initializer
#endif
/***************************************************************************
****************************************************************************
*