Bug 669721 - Annotate xpc::CompartmentPrivate for trace-refcnt. r=mrbkap
authorJesse Ruderman <jruderman@gmail.com>
Wed, 06 Jul 2011 14:53:46 -0700
changeset 72439 078d03b6ab08561dcca10a37107c285c81d6b97f
parent 72438 2b2d322e42415cb185cb338ab7ebe5c63db2d940
child 72440 297f3d9dc620150fa570553e5a5a78021e80acb6
push id430
push userjruderman@mozilla.com
push dateWed, 06 Jul 2011 21:54:29 +0000
treeherdermozilla-inbound@078d03b6ab08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs669721
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 669721 - Annotate xpc::CompartmentPrivate for trace-refcnt. r=mrbkap
js/src/xpconnect/src/xpcjsruntime.cpp
js/src/xpconnect/src/xpcprivate.h
--- a/js/src/xpconnect/src/xpcjsruntime.cpp
+++ b/js/src/xpconnect/src/xpcjsruntime.cpp
@@ -243,16 +243,17 @@ ContextCallback(JSContext *cx, uintN ope
     }
     return JS_TRUE;
 }
 
 xpc::CompartmentPrivate::~CompartmentPrivate()
 {
     delete waiverWrapperMap;
     delete expandoMap;
+    MOZ_COUNT_DTOR(xpc::CompartmentPrivate);
 }
 
 static JSBool
 CompartmentCallback(JSContext *cx, JSCompartment *compartment, uintN op)
 {
     JS_ASSERT(op == JSCOMPARTMENT_DESTROY);
 
     XPCJSRuntime* self = nsXPConnect::GetRuntimeInstance();
--- a/js/src/xpconnect/src/xpcprivate.h
+++ b/js/src/xpconnect/src/xpcprivate.h
@@ -4388,26 +4388,28 @@ struct CompartmentPrivate
     CompartmentPrivate(PtrAndPrincipalHashKey *key, bool wantXrays, bool cycleCollectionEnabled)
         : key(key),
           ptr(nsnull),
           wantXrays(wantXrays),
           cycleCollectionEnabled(cycleCollectionEnabled),
           waiverWrapperMap(nsnull),
           expandoMap(nsnull)
     {
+        MOZ_COUNT_CTOR(xpc::CompartmentPrivate);
     }
 
     CompartmentPrivate(nsISupports *ptr, bool wantXrays, bool cycleCollectionEnabled)
         : key(nsnull),
           ptr(ptr),
           wantXrays(wantXrays),
           cycleCollectionEnabled(cycleCollectionEnabled),
           waiverWrapperMap(nsnull),
           expandoMap(nsnull)
     {
+        MOZ_COUNT_CTOR(xpc::CompartmentPrivate);
     }
 
     ~CompartmentPrivate();
 
     // NB: key and ptr are mutually exclusive.
     nsAutoPtr<PtrAndPrincipalHashKey> key;
     nsCOMPtr<nsISupports> ptr;
     bool wantXrays;