Push version 2.2.2 to trunk.
Introduced new profiler API.
Fixed random number generator to produce full 32 random bits.
git-svn-id: http://v8.googlecode.com/svn/trunk@4386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 5e1b9f2..4e4cf28 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -60,8 +60,28 @@
}
}
+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(CodeEvents) {
InitializeVM();
+ TestSetup test_setup;
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);
@@ -128,6 +148,7 @@
}
TEST(TickEvents) {
+ TestSetup test_setup;
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);