зеркало из https://github.com/mozilla/gecko-dev.git
bug 629655 - avoid influencing the malloc GC counters when dumping the heap. r=anygregor
This commit is contained in:
Родитель
929834285d
Коммит
246f359b89
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче