Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index b612c482a96573659a00b382050d54a4c34dd536..1067a38600fa3a1b0ee99248a74c27da3fa85115 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -526,6 +526,8 @@ Handle<Value> Shell::Version(const Arguments& args) { |
void Shell::ReportException(v8::TryCatch* try_catch) { |
HandleScope handle_scope; |
+ bool enter_context = !Context::InContext(); |
+ if (enter_context) utility_context_->Enter(); |
v8::String::Utf8Value exception(try_catch->Exception()); |
const char* exception_string = ToCString(exception); |
Handle<Message> message = try_catch->Message(); |
@@ -560,6 +562,7 @@ void Shell::ReportException(v8::TryCatch* try_catch) { |
} |
} |
printf("\n"); |
+ if (enter_context) utility_context_->Exit(); |
} |