From c412264c4ac42a92cc41cefb02c49b9e461e7ed4 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Thu, 22 Nov 2012 08:35:21 +0000 Subject: [PATCH] Fix counters in d8. R=svenpanne@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/11416135 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8.cc | 8 ++++++-- src/d8.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/d8.cc b/src/d8.cc index 9fc909ba9f..814a8f44ee 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -1269,8 +1269,11 @@ void Shell::Initialize(Isolate* isolate) { V8::SetAddHistogramSampleFunction(AddHistogramSample); } #endif // V8_SHARED - if (options.test_shell) return; +} + +void Shell::InitializeDebugger(Isolate* isolate) { + if (options.test_shell) return; #ifndef V8_SHARED Locker lock; HandleScope scope; @@ -1897,8 +1900,9 @@ int Shell::Main(int argc, char* argv[]) { int result = 0; Isolate* isolate = Isolate::GetCurrent(); { - Symbols symbols(isolate); Initialize(isolate); + Symbols symbols(isolate); + InitializeDebugger(isolate); if (options.stress_opt || options.stress_deopt) { Testing::SetStressRunType(options.stress_opt diff --git a/src/d8.h b/src/d8.h index b87b404de3..161c6533e7 100644 --- a/src/d8.h +++ b/src/d8.h @@ -384,6 +384,7 @@ class Shell : public i::AllStatic { static void InstallUtilityScript(); #endif // V8_SHARED static void Initialize(Isolate* isolate); + static void InitializeDebugger(Isolate* isolate); static void RunShell(Isolate* isolate); static bool SetOptions(int argc, char* argv[]); static Handle CreateGlobalTemplate(Isolate* isolate);