Reviewers: Sven Panne,

Description:
Fix counters in d8.


[email protected]
BUG=


Please review this at https://chromiumcodereview.appspot.com/11416135/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/d8.h
  M src/d8.cc


Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 9fc909ba9fb59173e2a18bade8553abe17dd412f..814a8f44ee52e11c25ee104b133808d6337a5017 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
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index b87b404de3bca831b0b5b1c410e0cc4dcca4fff7..161c6533e7f2c96e4fd40e3bfcf1bae2870a8e5f 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<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to