зеркало из 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;
|
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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче