Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1534)

Unified Diff: src/d8.cc

Issue 7779032: Limit the time d8 interactive shell's input strings stay alive. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 729ce88bbc948a0a8b89c792b3870d872821368c..55f1c764028d204a63fc54f5502c5a6fd0390102 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -864,7 +864,7 @@ Handle<String> Shell::ReadFile(const char* name) {
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 @@ void Shell::RunShell() {
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 @@ void Shell::RunShell() {
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698