Bug 1120655 - Label various compartment iters as GCPointers, r=terrence

--HG--
extra : rebase_source : 33addf15ffb10c652245caac4dbbd6d4979dcaef
This commit is contained in:
Steve Fink 2015-01-12 14:09:21 -08:00
Родитель ed3ab4dd99
Коммит 7a5694c553
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -281,3 +281,8 @@ function isOverridableField(initialCSU, csu, field)
return true;
}
function isGCPointer(typeName)
{
return typeName.indexOf("CompartmentsIter") != -1;
}

Просмотреть файл

@ -5,6 +5,8 @@
loadRelativeToScript('utility.js');
loadRelativeToScript('annotations.js');
var annotatedGCPointers = [];
function processCSU(csu, body)
{
if (!("DataField" in body))
@ -25,6 +27,8 @@ function processCSU(csu, body)
addNestedStructure(csu, type.Name, fieldName);
}
}
if (isGCPointer(csu))
annotatedGCPointers.push(csu);
}
var structureParents = {}; // Map from field => list of <parent, fieldName>
@ -143,6 +147,9 @@ addGCType('js::ion::IonCode');
addGCPointer('JS::Value');
addGCPointer('jsid');
for (var typeName of annotatedGCPointers)
addGCPointer(typeName);
// AutoCheckCannotGC should also not be held live across a GC function.
addGCPointer('JS::AutoCheckCannotGC');