Reviewers: dcarney, Sven Panne,
Description:
Fix d8-readline to use modern Persistent API
[email protected], [email protected]
Please review this at https://codereview.chromium.org/23537060/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -3 lines):
M src/d8-readline.cc
Index: src/d8-readline.cc
diff --git a/src/d8-readline.cc b/src/d8-readline.cc
index
298518d72ab4ab31ebab2ee90ba208d23ea8b231..44f0e8415916a5ec81e650bc20812361ce204eff
100644
--- a/src/d8-readline.cc
+++ b/src/d8-readline.cc
@@ -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(isolate, Handle<Array>());
return NULL;
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.