Hi all,

I was building d8 from the master of github.com/v8/v8 today, but there were 
some warnings in d8-readline.cc that got treated as errors, so the build 
failed.

Looks like it's a remanent from 
Issue 12426015: https://chromiumcodereview.appspot.com/12426015

A quick patch to fix the problem:

$ git diff
diff --git a/src/d8-readline.cc b/src/d8-readline.cc
index 0226f31..b920362 100644
--- a/src/d8-readline.cc
+++ b/src/d8-readline.cc
@@ -114,7 +114,7 @@ Handle<String> ReadLineEditor::Prompt(const char* 
prompt) {
   } else {
     return Handle<String>();
   }
-  return String::New(result);
+  return String::NewFromUtf8(Isolate::GetCurrent(), result);
 }
 
 
@@ -153,8 +153,8 @@ char* ReadLineEditor::CompletionGenerator(const char* 
text, int state) {
   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 {


Best regards,
Kris

-- 
-- 
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.

Reply via email to