Reviewers: Christian Plesner Hansen, Message: Just pinging about this change. It's currently holding up the language shootout from using V8.
Description: Modifies readline() so that an empty string is returned if fgets fails to read data from stdin. The Computer Language Benchmarks game requires that d8's readline() works in this way. Please review this at http://codereview.chromium.org/173262 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/d8.cc Index: src/d8.cc =================================================================== --- src/d8.cc (revision 2740) +++ src/d8.cc (working copy) @@ -182,7 +182,7 @@ Handle<Value> Shell::ReadLine(const Arguments& args) { char line_buf[256]; if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) { - return ThrowException(String::New("Error reading line")); + return String::New(""); } int len = strlen(line_buf); if (line_buf[len - 1] == '\n') { --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
