Index: src/builtins.cc |
=================================================================== |
--- src/builtins.cc (revision 904) |
+++ src/builtins.cc (working copy) |
@@ -354,7 +354,6 @@ |
v8::InvocationCallback callback = |
v8::ToCData<v8::InvocationCallback>(callback_obj); |
Object* data_obj = call_data->data(); |
- Object* result; |
v8::Local<v8::Object> self = |
v8::Utils::ToLocal(Handle<JSObject>::cast(receiver)); |
@@ -379,11 +378,16 @@ |
VMState state(OTHER); |
value = callback(args); |
} |
+ Object* result; |
if (value.IsEmpty()) { |
result = Heap::undefined_value(); |
} else { |
result = *reinterpret_cast<Object**>(*value); |
} |
+ if (result->IsException()) { |
+ ASSERT(Top::has_pending_exception()); |
+ Top::ReportPendingMessages(); |
Mads Ager (chromium)
2008/12/03 15:44:48
I'm not sure I understand why we need to check her
olehougaard
2008/12/04 08:44:35
This was a remnant from an earlier effort to get t
|
+ } |
RETURN_IF_SCHEDULED_EXCEPTION(); |
if (!is_construct || result->IsJSObject()) return result; |