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

Side by Side Diff: include/v8.h

Issue 630373003: Add stack trace to the promise reject callback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed 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 | « no previous file | src/isolate.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 4196 matching lines...) Expand 10 before | Expand all | Expand 10 after
4207 4207
4208 // --- Leave Script Callback --- 4208 // --- Leave Script Callback ---
4209 typedef void (*CallCompletedCallback)(); 4209 typedef void (*CallCompletedCallback)();
4210 4210
4211 // --- Promise Reject Callback --- 4211 // --- Promise Reject Callback ---
4212 enum PromiseRejectEvent { 4212 enum PromiseRejectEvent {
4213 kPromiseRejectWithNoHandler = 0, 4213 kPromiseRejectWithNoHandler = 0,
4214 kPromiseHandlerAddedAfterReject = 1 4214 kPromiseHandlerAddedAfterReject = 1
4215 }; 4215 };
4216 4216
4217 typedef void (*PromiseRejectCallback)(Handle<Promise> promise, 4217 class PromiseRejectMessage {
4218 Handle<Value> value, 4218 public:
4219 PromiseRejectEvent event); 4219 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event,
4220 Handle<Value> value, Handle<StackTrace> stack_trace)
4221 : promise_(promise),
4222 event_(event),
4223 value_(value),
4224 stack_trace_(stack_trace) {}
4225
4226 V8_INLINE Handle<Promise> GetPromise() const { return promise_; }
4227 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; }
4228 V8_INLINE Handle<Value> GetValue() const { return value_; }
4229 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; }
4230
4231 private:
4232 Handle<Promise> promise_;
4233 PromiseRejectEvent event_;
4234 Handle<Value> value_;
4235 Handle<StackTrace> stack_trace_;
4236 };
4237
4238 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message);
4220 4239
4221 // --- Microtask Callback --- 4240 // --- Microtask Callback ---
4222 typedef void (*MicrotaskCallback)(void* data); 4241 typedef void (*MicrotaskCallback)(void* data);
4223 4242
4224 // --- Failed Access Check Callback --- 4243 // --- Failed Access Check Callback ---
4225 typedef void (*FailedAccessCheckCallback)(Local<Object> target, 4244 typedef void (*FailedAccessCheckCallback)(Local<Object> target,
4226 AccessType type, 4245 AccessType type,
4227 Local<Value> data); 4246 Local<Value> data);
4228 4247
4229 // --- AllowCodeGenerationFromStrings callbacks --- 4248 // --- AllowCodeGenerationFromStrings callbacks ---
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
7042 */ 7061 */
7043 7062
7044 7063
7045 } // namespace v8 7064 } // namespace v8
7046 7065
7047 7066
7048 #undef TYPE_CHECK 7067 #undef TYPE_CHECK
7049 7068
7050 7069
7051 #endif // V8_H_ 7070 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698