зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120655 - Label various compartment iters as GCPointers, r=terrence
--HG-- extra : rebase_source : 33addf15ffb10c652245caac4dbbd6d4979dcaef
This commit is contained in:
Родитель
ed3ab4dd99
Коммит
7a5694c553
|
@ -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');
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче