Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ac9de3df1e2b38764044bc0ca1ba03747b64e9a5..a2685ee8856a1460aab437b4daf416416690171c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -7727,14 +7727,22 @@ DEFINE_ERROR(Error, error) |
#undef DEFINE_ERROR |
+Local<Message> Exception::CreateMessage(Isolate* isolate, |
+ Local<Value> exception) { |
+ i::Handle<i::Object> obj = Utils::OpenHandle(*exception); |
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
+ ENTER_V8(i_isolate); |
+ i::HandleScope scope(i_isolate); |
+ return Utils::MessageToLocal( |
+ scope.CloseAndEscape(i_isolate->CreateMessage(obj, NULL))); |
+} |
+ |
+ |
Local<Message> Exception::CreateMessage(Local<Value> exception) { |
i::Handle<i::Object> obj = Utils::OpenHandle(*exception); |
if (!obj->IsHeapObject()) return Local<Message>(); |
i::Isolate* isolate = i::HeapObject::cast(*obj)->GetIsolate(); |
- ENTER_V8(isolate); |
- i::HandleScope scope(isolate); |
- return Utils::MessageToLocal( |
- scope.CloseAndEscape(isolate->CreateMessage(obj, NULL))); |
+ return CreateMessage(reinterpret_cast<Isolate*>(isolate), exception); |
} |