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; edgeNameSize = strlen(edgeName) + 1;
node = (JSHeapDumpNode *) node = (JSHeapDumpNode *) js_malloc(offsetof(JSHeapDumpNode, edgeName) + edgeNameSize);
cx->malloc(offsetof(JSHeapDumpNode, edgeName) + edgeNameSize);
if (!node) { if (!node) {
dtrc->ok = JS_FALSE; dtrc->ok = JS_FALSE;
return; return;
@ -2514,7 +2513,7 @@ JS_DumpHeap(JSContext *cx, FILE *fp, void* startThing, uint32 startKind,
for (;;) { for (;;) {
next = node->next; next = node->next;
parent = node->parent; parent = node->parent;
cx->free(node); js_free(node);
node = next; node = next;
if (node) if (node)
break; break;