Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 4d39aa543d6f79e96d1e5879f94d53638e1eebc4..b8cfe4f09749ac39b979f2a80e741a463490661c 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -15199,6 +15199,12 @@ THREADED_TEST(ExternalAllocatedMemory) { |
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)); |
} |