Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: src/builtins.cc

Issue 12901: Reporting uncaught errors at the boundary between C++ and JS instead of tryin... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/execution.cc » ('j') | src/execution.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/execution.cc » ('j') | src/execution.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698