Index: src/d8-readline.cc |
diff --git a/src/d8-readline.cc b/src/d8-readline.cc |
index eca6553af86506162f3c0239ac6539d576e3e3f8..39c93d35de5859f49b3a697b09cec2a2be7108e3 100644 |
--- a/src/d8-readline.cc |
+++ b/src/d8-readline.cc |
@@ -25,7 +25,7 @@ |
class ReadLineEditor: public LineEditor { |
public: |
ReadLineEditor() : LineEditor(LineEditor::READLINE, "readline") { } |
- virtual Local<String> Prompt(const char* prompt); |
+ virtual Handle<String> Prompt(const char* prompt); |
virtual bool Open(Isolate* isolate); |
virtual bool Close(); |
virtual void AddHistory(const char* str); |
@@ -80,10 +80,10 @@ |
} |
-Local<String> ReadLineEditor::Prompt(const char* prompt) { |
+Handle<String> ReadLineEditor::Prompt(const char* prompt) { |
char* result = NULL; |
result = readline(prompt); |
- if (result == NULL) return Local<String>(); |
+ if (result == NULL) return Handle<String>(); |
AddHistory(result); |
return String::NewFromUtf8(isolate_, result); |
} |
@@ -118,10 +118,10 @@ |
char* ReadLineEditor::CompletionGenerator(const char* text, int state) { |
static unsigned current_index; |
- static Global<Array> current_completions; |
+ static Persistent<Array> current_completions; |
Isolate* isolate = read_line_editor.isolate_; |
HandleScope scope(isolate); |
- Local<Array> completions; |
+ Handle<Array> completions; |
if (state == 0) { |
Local<String> full_text = String::NewFromUtf8(isolate, |
rl_line_buffer, |
@@ -136,8 +136,8 @@ |
completions = Local<Array>::New(isolate, current_completions); |
} |
if (current_index < completions->Length()) { |
- Local<Integer> index = Integer::New(isolate, current_index); |
- Local<Value> str_obj = completions->Get(index); |
+ Handle<Integer> index = Integer::New(isolate, current_index); |
+ Handle<Value> str_obj = completions->Get(index); |
current_index++; |
String::Utf8Value str(str_obj); |
return strdup(*str); |