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

Unified Diff: src/d8.cc

Issue 7889033: Reverting r9272. (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 | « src/d8.h ('k') | 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 87fa50f59f120e2422a763eb158559f765bf478e..a02529999aaa95864923ae9f5bedb186ac39319b 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -117,7 +117,6 @@ CounterCollection Shell::local_counters_;
CounterCollection* Shell::counters_ = &local_counters_;
i::Mutex* Shell::context_mutex_(i::OS::CreateMutex());
Persistent<Context> Shell::utility_context_;
-LineEditor* Shell::console = NULL;
#endif // V8_SHARED
Persistent<Context> Shell::evaluation_context_;
@@ -792,7 +791,6 @@ void Shell::Exit(int exit_code) {
#ifndef V8_SHARED
void Shell::OnExit() {
- console->Close();
if (i::FLAG_dump_counters) {
printf("+----------------------------------------+-------------+\n");
printf("| Name | Value |\n");
@@ -897,20 +895,20 @@ void Shell::RunShell() {
HandleScope outer_scope;
Handle<String> name = String::New("(d8)");
#ifndef V8_SHARED
- console = LineEditor::Get();
- printf("V8 version %s [console: %s]\n", V8::GetVersion(), console->name());
+ LineEditor* editor = LineEditor::Get();
+ printf("V8 version %s [console: %s]\n", V8::GetVersion(), editor->name());
if (i::FLAG_debugger) {
printf("JavaScript debugger enabled\n");
}
- console->Open();
+ editor->Open();
while (true) {
- i::SmartArrayPointer<char> input = console->Prompt(Shell::kPrompt);
+ i::SmartArrayPointer<char> input = editor->Prompt(Shell::kPrompt);
if (input.is_empty()) break;
- console->AddHistory(*input);
+ editor->AddHistory(*input);
HandleScope inner_scope;
ExecuteString(String::New(*input), name, true, true);
}
- console->Close();
+ editor->Close();
#else
printf("V8 version %s [D8 light using shared library]\n", V8::GetVersion());
static const int kBufferSize = 256;
« no previous file with comments | « src/d8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698