Correctly handle AdjustAmountOfExternalAllocatedMemory(0).
authorulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 3 Dec 2012 14:31:11 +0000 (14:31 +0000)
committerulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 3 Dec 2012 14:31:11 +0000 (14:31 +0000)
R=yangguo@chromium.org
BUG=v8:2440

Review URL: https://chromiumcodereview.appspot.com/11412299

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/heap-inl.h

index 33bc4f9..de47c94 100644 (file)
@@ -460,7 +460,7 @@ intptr_t Heap::AdjustAmountOfExternalAllocatedMemory(
     intptr_t change_in_bytes) {
   ASSERT(HasBeenSetUp());
   intptr_t amount = amount_of_external_allocated_memory_ + change_in_bytes;
-  if (change_in_bytes >= 0) {
+  if (change_in_bytes > 0) {
     // Avoid overflow.
     if (amount > amount_of_external_allocated_memory_) {
       amount_of_external_allocated_memory_ = amount;