BUG=
Review URL: https://codereview.chromium.org/
866413002
Cr-Commit-Position: refs/heads/master@{#26247}
amount - *amount_of_external_allocated_memory_at_last_global_gc >
I::kExternalAllocationLimit) {
CollectAllGarbage("external memory allocation limit reached.");
- } else {
- *amount_of_external_allocated_memory = amount;
}
+ *amount_of_external_allocated_memory = amount;
return *amount_of_external_allocated_memory;
}
isolate->AdjustAmountOfExternalAllocatedMemory(kSize));
CHECK_EQ(baseline,
isolate->AdjustAmountOfExternalAllocatedMemory(-kSize));
+ const int64_t kTriggerGCSize =
+ v8::internal::Internals::kExternalAllocationLimit + 1;
+ CHECK_EQ(baseline + kTriggerGCSize,
+ isolate->AdjustAmountOfExternalAllocatedMemory(kTriggerGCSize));
+ CHECK_EQ(baseline,
+ isolate->AdjustAmountOfExternalAllocatedMemory(-kTriggerGCSize));
}