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

Side by Side Diff: src/messages.h

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, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The infrastructure used for (localized) message reporting in V8. 5 // The infrastructure used for (localized) message reporting in V8.
6 // 6 //
7 // Note: there's a big unresolved issue about ownership of the data 7 // Note: there's a big unresolved issue about ownership of the data
8 // structures used by this framework. 8 // structures used by this framework.
9 9
10 #ifndef V8_MESSAGES_H_ 10 #ifndef V8_MESSAGES_H_
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 int end_pos_; 61 int end_pos_;
62 }; 62 };
63 63
64 64
65 // A message handler is a convenience interface for accessing the list 65 // A message handler is a convenience interface for accessing the list
66 // of message listeners registered in an environment 66 // of message listeners registered in an environment
67 class MessageHandler { 67 class MessageHandler {
68 public: 68 public:
69 // Returns a message object for the API to use. 69 // Returns a message object for the API to use.
70 static Handle<JSMessageObject> MakeMessageObject( 70 static Handle<JSMessageObject> MakeMessageObject(
71 Isolate* isolate, 71 Isolate* isolate, const char* type, MessageLocation* loc,
72 const char* type, 72 Vector<Handle<Object> > args, Handle<JSObject> promise,
73 MessageLocation* loc,
74 Vector< Handle<Object> > args,
75 Handle<JSArray> stack_frames); 73 Handle<JSArray> stack_frames);
76 74
77 // Report a formatted message (needs JS allocation). 75 // Report a formatted message (needs JS allocation).
78 static void ReportMessage(Isolate* isolate, 76 static void ReportMessage(Isolate* isolate,
79 MessageLocation* loc, 77 MessageLocation* loc,
80 Handle<Object> message); 78 Handle<Object> message);
81 79
82 static void DefaultMessageReport(Isolate* isolate, 80 static void DefaultMessageReport(Isolate* isolate,
83 const MessageLocation* loc, 81 const MessageLocation* loc,
84 Handle<Object> message_obj); 82 Handle<Object> message_obj);
85 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 83 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
86 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 84 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate,
87 Handle<Object> data); 85 Handle<Object> data);
88 }; 86 };
89 87
90 } } // namespace v8::internal 88 } } // namespace v8::internal
91 89
92 #endif // V8_MESSAGES_H_ 90 #endif // V8_MESSAGES_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698