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

Unified Diff: runtime/vm/heap_test.cc

Issue 2984883002: Remove fields from Isolate in Product mode (Closed)
Patch Set: Address comments Created 3 years, 5 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 | « runtime/vm/heap.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap_test.cc
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc
index cc681155c4ce4bd420bc2425aa66f4a8913c07eb..1877b20df999e8c3d846406ea837cb76f4392c4c 100644
--- a/runtime/vm/heap_test.cc
+++ b/runtime/vm/heap_test.cc
@@ -18,7 +18,7 @@ TEST_CASE(OldGC) {
"main() {\n"
" return [1, 2, 3];\n"
"}\n";
- FLAG_verbose_gc = true;
+ NOT_IN_PRODUCT(FLAG_verbose_gc = true);
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -50,14 +50,14 @@ TEST_CASE(OldGC_Unsync) {
Heap* heap = isolate->heap();
heap->CollectGarbage(Heap::kOld);
}
-#endif
+#endif // !defined(PRODUCT)
TEST_CASE(LargeSweep) {
const char* kScriptChars =
"main() {\n"
" return new List(8 * 1024 * 1024);\n"
"}\n";
- FLAG_verbose_gc = true;
+ NOT_IN_PRODUCT(FLAG_verbose_gc = true);
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_EnterScope();
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -107,6 +107,8 @@ TEST_CASE(ClassHeapStats) {
" var x = new A();\n"
" return new A();\n"
"}\n";
+ bool saved_concurrent_sweep_mode = FLAG_concurrent_sweep;
+ FLAG_concurrent_sweep = false;
Dart_Handle h_lib = TestCase::LoadTestScript(kScriptChars, NULL);
Isolate* isolate = Isolate::Current();
ClassTable* class_table = isolate->class_table();
@@ -187,6 +189,7 @@ TEST_CASE(ClassHeapStats) {
EXPECT_EQ(0, class_stats->pre_gc.old_count);
EXPECT_EQ(0, class_stats->post_gc.old_count);
EXPECT_EQ(0, class_stats->recent.old_count);
+ FLAG_concurrent_sweep = saved_concurrent_sweep_mode;
}
TEST_CASE(ArrayHeapStats) {
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698