Revision: 18037
Author: [email protected]
Date: Mon Nov 25 08:36:46 2013 UTC
Log: Unbreak console=readline.
[email protected]
Review URL: https://codereview.chromium.org/85343002
http://code.google.com/p/v8/source/detail?r=18037
Modified:
/branches/bleeding_edge/src/d8-readline.cc
=======================================
--- /branches/bleeding_edge/src/d8-readline.cc Fri Sep 20 18:16:52 2013 UTC
+++ /branches/bleeding_edge/src/d8-readline.cc Mon Nov 25 08:36:46 2013 UTC
@@ -109,12 +109,9 @@
Unlocker unlock(Isolate::GetCurrent());
result = readline(prompt);
}
- if (result != NULL) {
- AddHistory(result);
- } else {
- return Handle<String>();
- }
- return String::New(result);
+ if (result == NULL) return Handle<String>();
+ AddHistory(result);
+ return String::NewFromUtf8(isolate_, result);
}
@@ -153,8 +150,13 @@
HandleScope scope(isolate);
Handle<Array> completions;
if (state == 0) {
- Local<String> full_text = String::New(rl_line_buffer, rl_point);
- completions = Shell::GetCompletions(isolate, String::New(text),
full_text);
+ Local<String> full_text = String::NewFromUtf8(isolate,
+ rl_line_buffer,
+ String::kNormalString,
+ rl_point);
+ completions = Shell::GetCompletions(isolate,
+ String::NewFromUtf8(isolate, text),
+ full_text);
current_completions.Reset(isolate, completions);
current_index = 0;
} else {
--
--
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.