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

Side by Side Diff: src/d8-readline.cc

Issue 279423004: Remove DebuggerAgent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove some more includes. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/d8-debug.cc ('k') | src/debug.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> // NOLINT 5 #include <stdio.h> // NOLINT
6 #include <string.h> // NOLINT 6 #include <string.h> // NOLINT
7 #include <readline/readline.h> // NOLINT 7 #include <readline/readline.h> // NOLINT
8 #include <readline/history.h> // NOLINT 8 #include <readline/history.h> // NOLINT
9 9
10 // The readline includes leaves RETURN defined which breaks V8 compilation. 10 // The readline includes leaves RETURN defined which breaks V8 compilation.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 77
78 bool ReadLineEditor::Close() { 78 bool ReadLineEditor::Close() {
79 return write_history(kHistoryFileName) == 0; 79 return write_history(kHistoryFileName) == 0;
80 } 80 }
81 81
82 82
83 Handle<String> ReadLineEditor::Prompt(const char* prompt) { 83 Handle<String> ReadLineEditor::Prompt(const char* prompt) {
84 char* result = NULL; 84 char* result = NULL;
85 { // Release lock for blocking input. 85 { // Release lock for blocking input.
86 Unlocker unlock(Isolate::GetCurrent()); 86 Unlocker unlock(isolate_);
87 result = readline(prompt); 87 result = readline(prompt);
88 } 88 }
89 if (result == NULL) return Handle<String>(); 89 if (result == NULL) return Handle<String>();
90 AddHistory(result); 90 AddHistory(result);
91 return String::NewFromUtf8(isolate_, result); 91 return String::NewFromUtf8(isolate_, result);
92 } 92 }
93 93
94 94
95 void ReadLineEditor::AddHistory(const char* str) { 95 void ReadLineEditor::AddHistory(const char* str) {
96 // Do not record empty input. 96 // Do not record empty input.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return strdup(*str); 147 return strdup(*str);
148 } else { 148 } else {
149 current_completions.Reset(); 149 current_completions.Reset();
150 return NULL; 150 return NULL;
151 } 151 }
152 } 152 }
153 #endif // V8_SHARED 153 #endif // V8_SHARED
154 154
155 155
156 } // namespace v8 156 } // namespace v8
OLDNEW
« no previous file with comments | « src/d8-debug.cc ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698