| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 805a0cf1ad458883729d34498ec5b9a47b64efa0..941f34d577ee70ea2cc77f21e9a26cf8de08cf72 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -227,11 +227,13 @@ bool Shell::ExecuteString(Isolate* isolate,
|
| }
|
| #if !defined(V8_SHARED)
|
| } else {
|
| + v8::TryCatch try_catch;
|
| Context::Scope context_scope(utility_context_);
|
| Handle<Object> global = utility_context_->Global();
|
| Handle<Value> fun = global->Get(String::New("Stringify"));
|
| Handle<Value> argv[1] = { result };
|
| Handle<Value> s = Handle<Function>::Cast(fun)->Call(global, 1, argv);
|
| + if (try_catch.HasCaught()) return true;
|
| v8::String::Utf8Value str(s);
|
| fwrite(*str, sizeof(**str), str.length(), stdout);
|
| printf("\n");
|
|
|