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

Unified Diff: src/messages.cc

Issue 607913002: Report promise reject with no handler (behind a flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more comments Created 6 years, 3 months 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 | « src/messages.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index 290f756770c7d4b287ee2f5ce6d5b2326b7fe521..cf061ee5f6b2c790a8149b23ee10a016e950b02d 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -34,10 +34,8 @@ void MessageHandler::DefaultMessageReport(Isolate* isolate,
Handle<JSMessageObject> MessageHandler::MakeMessageObject(
- Isolate* isolate,
- const char* type,
- MessageLocation* loc,
- Vector< Handle<Object> > args,
+ Isolate* isolate, const char* type, MessageLocation* loc,
+ Vector<Handle<Object> > args, Handle<JSObject> promise,
Handle<JSArray> stack_frames) {
Factory* factory = isolate->factory();
Handle<String> type_handle = factory->InternalizeUtf8String(type);
@@ -62,13 +60,13 @@ Handle<JSMessageObject> MessageHandler::MakeMessageObject(
? Handle<Object>::cast(factory->undefined_value())
: Handle<Object>::cast(stack_frames);
- Handle<JSMessageObject> message =
- factory->NewJSMessageObject(type_handle,
- arguments_handle,
- start,
- end,
- script_handle,
- stack_frames_handle);
+ Handle<Object> promise_handle =
+ promise.is_null() ? Handle<Object>::cast(factory->undefined_value())
+ : Handle<Object>::cast(promise);
+
+ Handle<JSMessageObject> message = factory->NewJSMessageObject(
+ type_handle, arguments_handle, promise_handle, start, end, script_handle,
+ stack_frames_handle);
return message;
}
« no previous file with comments | « src/messages.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698