Index: test/cctest/test-profile-generator.cc |
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc |
index 2e45994064239e4eb0174516c82fd45b589dfec9..15a5b5af7273926e1c73d45ef77ad44efa162fa1 100644 |
--- a/test/cctest/test-profile-generator.cc |
+++ b/test/cctest/test-profile-generator.cc |
@@ -367,7 +367,27 @@ TEST(CodeMapMoveAndDeleteCode) { |
} |
+namespace { |
+ |
+class TestSetup { |
+ public: |
+ TestSetup() |
+ : old_flag_prof_browser_mode_(i::FLAG_prof_browser_mode) { |
+ i::FLAG_prof_browser_mode = false; |
+ } |
+ |
+ ~TestSetup() { |
+ i::FLAG_prof_browser_mode = old_flag_prof_browser_mode_; |
+ } |
+ |
+ private: |
+ bool old_flag_prof_browser_mode_; |
+}; |
+ |
+} // namespace |
+ |
TEST(RecordTickSample) { |
+ TestSetup test_setup; |
CpuProfilesCollection profiles; |
profiles.StartProfiling("", 1); |
ProfileGenerator generator(&profiles); |