[heap] Properly decrement amount of externally allocated memory
authorMichael Lippautz <mlippautz@chromium.org>
Mon, 31 Aug 2015 21:11:15 +0000 (23:11 +0200)
committerMichael Lippautz <mlippautz@chromium.org>
Mon, 31 Aug 2015 21:11:38 +0000 (21:11 +0000)
TBR=mstarzinger@chromium.org
BUG=chromium:526244
LOG=N

Review URL: https://codereview.chromium.org/1329493002 .

Cr-Commit-Position: refs/heads/master@{#30487}

src/heap/heap.cc

index a4357f1..086f5cd 100644 (file)
@@ -1847,7 +1847,7 @@ void Heap::FreeDeadArrayBuffers(bool from_scavenge) {
   }
 
   // Do not call through the api as this code is triggered while doing a GC.
-  amount_of_external_allocated_memory_ += FreeDeadArrayBuffersHelper(
+  amount_of_external_allocated_memory_ -= FreeDeadArrayBuffersHelper(
       isolate_,
       from_scavenge ? live_array_buffers_for_scavenge_ : live_array_buffers_,
       from_scavenge ? not_yet_discovered_array_buffers_for_scavenge_