Commit 6b5e87bd authored by adamk@chromium.org's avatar adamk@chromium.org

Fix d8-readline to use modern Persistent API

R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/23537060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 44afd2a5
......@@ -150,7 +150,7 @@ char* ReadLineEditor::CompletionGenerator(const char* text, int state) {
static Persistent<Array> current_completions;
Isolate* isolate = read_line_editor.isolate_;
Locker lock(isolate);
HandleScope scope;
HandleScope scope(isolate);
Handle<Array> completions;
if (state == 0) {
Local<String> full_text = String::New(rl_line_buffer, rl_point);
......@@ -167,8 +167,7 @@ char* ReadLineEditor::CompletionGenerator(const char* text, int state) {
String::Utf8Value str(str_obj);
return strdup(*str);
} else {
current_completions.Dispose(isolate);
current_completions.Clear();
current_completions.Reset();
return NULL;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment