Bug 1500247 - Fix bug in handling MOZ_INHERIT_ATTRIBUTE_FROM_TEMPLATE_PARAM for GC ptrdness, r=jonco
authorSteve Fink <sfink@mozilla.com>
Fri, 14 Dec 2018 14:41:58 -0800
changeset 458985 f0e97add682c
parent 458984 fd3f61ce9366
child 458986 2a8867abaa0f
push id35553
push usershindli@mozilla.com
push dateThu, 14 Feb 2019 04:41:18 +0000
treeherdermozilla-central@f0ea53f47215 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1500247
milestone67.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 1500247 - Fix bug in handling MOZ_INHERIT_ATTRIBUTE_FROM_TEMPLATE_PARAM for GC ptrdness, r=jonco
js/src/devtools/rootAnalysis/computeGCTypes.js
--- a/js/src/devtools/rootAnalysis/computeGCTypes.js
+++ b/js/src/devtools/rootAnalysis/computeGCTypes.js
@@ -195,19 +195,19 @@ for (const csu of inheritors) {
         param = param.replace(/\s+$/, '')
         const pieces = param.split("*");
         const core_type = pieces[0];
         const ptrdness = pieces.length - 1;
         if (ptrdness > 1)
             continue;
         const paramDesc = 'template-param-' + param;
         const why = '(inherited annotations from ' + param + ')';
-        if (typeInfo.GCThings.indexOf(core_type) != -1)
+        if (core_type in gcTypes)
             markGCType(csu, paramDesc, why, ptrdness, 0, "");
-        if (typeInfo.GCPointers.indexOf(core_type) != -1)
+        if (core_type in gcPointers)
             markGCType(csu, paramDesc, why, ptrdness + 1, 0, "");
     }
 }
 
 // Everything that inherits from a "Rooted Base" is considered to be rooted.
 // This is for things like CustomAutoRooter and its subclasses.
 var basework = Object.keys(typeInfo.RootedBases);
 while (basework.length) {