bug 629655 - avoid influencing the malloc GC counters when dumping the heap. r=anygregor

This commit is contained in:
Igor Bukanov 2011-01-28 23:25:05 +01:00
Родитель 929834285d
Коммит 246f359b89
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -2361,8 +2361,7 @@ DumpNotify(JSTracer *trc, void *thing, uint32 kind)
}
edgeNameSize = strlen(edgeName) + 1;
node = (JSHeapDumpNode *)
cx->malloc(offsetof(JSHeapDumpNode, edgeName) + edgeNameSize);
node = (JSHeapDumpNode *) js_malloc(offsetof(JSHeapDumpNode, edgeName) + edgeNameSize);
if (!node) {
dtrc->ok = JS_FALSE;
return;
@ -2514,7 +2513,7 @@ JS_DumpHeap(JSContext *cx, FILE *fp, void* startThing, uint32 startKind,
for (;;) {
next = node->next;
parent = node->parent;
cx->free(node);
js_free(node);
node = next;
if (node)
break;