No bug. Fix rooting static analysis annotation for GetWeakmapKeyDelegate and document the ignores. r=NPOTB
authorSteve Fink <sfink@mozilla.com>
Thu, 02 May 2013 10:01:16 -0700
changeset 141593 db0abc62a0fd1c46a22f6b5e06416f82eaf89999
parent 141592 e4cc85a0fe1e16db72409eabf5e6b6cf03b0d6c7
child 141594 5f90a20c173e465944a36865f38b73f0e6fcd667
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNPOTB
milestone23.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
No bug. Fix rooting static analysis annotation for GetWeakmapKeyDelegate and document the ignores. r=NPOTB DONTBUILD because NPOTB.
js/src/devtools/rootAnalysis/annotations.js
--- a/js/src/devtools/rootAnalysis/annotations.js
+++ b/js/src/devtools/rootAnalysis/annotations.js
@@ -1,24 +1,23 @@
 /* -*- Mode: Javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
 "use strict";
 
+// Ignore calls made through these function pointers
 var ignoreIndirectCalls = {
     "mallocSizeOf" : true,
     "aMallocSizeOf" : true,
     "_malloc_message" : true,
     "__conv" : true,
     "__convf" : true,
     "prerrortable.c:callback_newtable" : true,
     "mozalloc_oom.cpp:void (* gAbortHandler)(size_t)" : true,
-    "JSObject* js::GetWeakmapKeyDelegate(JSObject*)" : true, // FIXME: mark with AutoAssertNoGC instead
 };
 
-
 function indirectCallCannotGC(caller, name)
 {
     if (name in ignoreIndirectCalls)
         return true;
 
     if (name == "mapper" && caller == "ptio.c:pt_MapError")
         return true;
 
@@ -27,28 +26,30 @@ function indirectCallCannotGC(caller, na
 
     // hook called during script finalization which cannot GC.
     if (/CallDestroyScriptHook/.test(caller))
         return true;
 
     return false;
 }
 
-// classes to ignore indirect calls on.
+// Ignore calls through functions pointers with these types
 var ignoreClasses = {
     "JSTracer" : true,
     "JSStringFinalizer" : true,
     "SprintfStateStr" : true,
     "JSLocaleCallbacks" : true,
     "JSC::ExecutableAllocator" : true,
     "PRIOMethods": true,
     "XPCOMFunctions" : true, // I'm a little unsure of this one
     "_MD_IOVector" : true,
 };
 
+// Ignore calls through TYPE.FIELD, where TYPE is the class or struct name containing
+// a function pointer field named FIELD.
 var ignoreCallees = {
     "js::Class.trace" : true,
     "js::Class.finalize" : true,
     "JSRuntime.destroyPrincipals" : true,
     "nsISupports.AddRef" : true,
     "nsISupports.Release" : true, // makes me a bit nervous; this is a bug but can happen
     "nsAXPCNativeCallContext.GetJSContext" : true,
     "js::ion::MDefinition.op" : true, // macro generated virtuals just return a constant
@@ -91,21 +92,23 @@ function ignoreEdgeUse(edge, variable)
             if (/~DebugOnly/.test(name))
                 return true;
         }
     }
 
     return false;
 }
 
+// Ignore calls of these functions (so ignore any stack containing these)
 var ignoreFunctions = {
     "ptio.c:pt_MapError" : true,
     "PR_ExplodeTime" : true,
     "PR_ErrorInstallTable" : true,
-    "PR_SetThreadPrivate" : true
+    "PR_SetThreadPrivate" : true,
+    "JSObject* js::GetWeakmapKeyDelegate(JSObject*)" : true, // FIXME: mark with AutoAssertNoGC instead
 };
 
 function ignoreGCFunction(fun)
 {
     if (fun in ignoreFunctions)
         return true;
 
     // Templatized function