Revision: 9143
Author:   [email protected]
Date:     Tue Sep  6 02:07:39 2011
Log:      Limit the time d8 interactive shell's input strings stay alive.

Review URL: http://codereview.chromium.org/7779032
http://code.google.com/p/v8/source/detail?r=9143

Modified:
 /branches/bleeding_edge/src/d8.cc

=======================================
--- /branches/bleeding_edge/src/d8.cc   Thu Sep  1 07:02:35 2011
+++ /branches/bleeding_edge/src/d8.cc   Tue Sep  6 02:07:39 2011
@@ -864,7 +864,7 @@
 void Shell::RunShell() {
   Locker locker;
   Context::Scope context_scope(evaluation_context_);
-  HandleScope handle_scope;
+  HandleScope outer_scope;
   Handle<String> name = String::New("(d8)");
 #ifndef V8_SHARED
   LineEditor* editor = LineEditor::Get();
@@ -877,6 +877,7 @@
     i::SmartPointer<char> input = editor->Prompt(Shell::kPrompt);
     if (input.is_empty()) break;
     editor->AddHistory(*input);
+    HandleScope inner_scope;
     ExecuteString(String::New(*input), name, true, true);
   }
   editor->Close();
@@ -887,6 +888,7 @@
     char buffer[kBufferSize];
     printf("%s", Shell::kPrompt);
     if (fgets(buffer, kBufferSize, stdin) == NULL) break;
+    HandleScope inner_scope;
     ExecuteString(String::New(buffer), name, true, true);
   }
 #endif  // V8_SHARED

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

Reply via email to