Chromium Code Reviews| 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>()); |
|
adamk
2013/09/18 00:22:42
This one I'm not so sure about...
dcarney
2013/09/18 07:17:02
should just be Reset()
adamk
2013/09/18 16:09:45
Hmm, I tried that before and got a crash...will tr
|
| return NULL; |
| } |
| } |