Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: test/cctest/test-api.cc

Issue 866413002: Always adjust amount of external memory when change is reported. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698