Reviewers: Sven,

Message:
In the interactive shell, the previous behavior when assigning a string
containing \0 is

d8> string='\0ABC'

d8>

Now it is

d8> string='\0ABC'
ABC
d8>


http://codereview.chromium.org/7792055/diff/1/src/d8.cc
File src/d8.cc (right):

http://codereview.chromium.org/7792055/diff/1/src/d8.cc#newcode180
src/d8.cc:180: printf("\n");
Same behavior as Shell::Write now.

Description:
Changed printing of immediate result in d8's interactive shell.
BUG=v8:371


Please review this at http://codereview.chromium.org/7792055/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/d8.cc


Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 025c7729170128aa691e299ae9aa433faf81630f..729ce88bbc948a0a8b89c792b3870d872821368c 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -176,8 +176,8 @@ bool Shell::ExecuteString(Handle<String> source,
         // If all went well and the result wasn't undefined then print
         // the returned value.
         v8::String::Utf8Value str(result);
-        const char* cstr = ToCString(str);
-        printf("%s\n", cstr);
+        fwrite(*str, sizeof(**str), str.length(), stdout);
+        printf("\n");
       }
       return true;
     }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to