Commit 8a1a926e authored by ulan@chromium.org's avatar ulan@chromium.org

Correctly handle AdjustAmountOfExternalAllocatedMemory(0).

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
parent 45fc1912
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment