| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 120496eccce5921f887eafadf6ebd71e59867edc..6ce7cd1625d99b6dd6887e8f23fd678c332436ff 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -172,7 +172,10 @@ bool Shell::ExecuteString(Handle<String> source,
|
| return false;
|
| } else {
|
| ASSERT(!try_catch.HasCaught());
|
| - if (print_result && !result->IsUndefined()) {
|
| + if (!print_result) return true;
|
| + if (result->IsUndefined()) {
|
| + printf("<undefined>\n");
|
| + } else {
|
| // If all went well and the result wasn't undefined then print
|
| // the returned value.
|
| v8::String::Utf8Value str(result);
|
|
|