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

Unified Diff: src/debug-debugger.js

Issue 249503002: Trigger debug event on not yet caught exception in promises. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: always use original exception Created 6 years, 8 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/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index d759fe5df118b0d12a3b8110881ce9875f026046..aebef4753fabdc0b3a49093a16bc6ba41c3a67b2 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -42,7 +42,8 @@ Debug.DebugEvent = { Break: 1,
NewFunction: 3,
BeforeCompile: 4,
AfterCompile: 5,
- ScriptCollected: 6 };
+ ScriptCollected: 6,
+ PendingExceptionInPromise: 7 };
aandrey 2014/04/29 13:04:36 Is it OK that this does not match the DebugEvent e
// Types of exceptions that can be broken upon.
Debug.ExceptionBreak = { Caught : 0,
@@ -1093,15 +1094,16 @@ BreakEvent.prototype.toJSONProtocol = function() {
};
-function MakeExceptionEvent(exec_state, exception, uncaught) {
- return new ExceptionEvent(exec_state, exception, uncaught);
+function MakeExceptionEvent(exec_state, exception, uncaught, promise) {
+ return new ExceptionEvent(exec_state, exception, uncaught, promise);
}
-function ExceptionEvent(exec_state, exception, uncaught) {
+function ExceptionEvent(exec_state, exception, uncaught, promise) {
this.exec_state_ = exec_state;
this.exception_ = exception;
this.uncaught_ = uncaught;
+ this.promise_ = promise;
}
@@ -1125,6 +1127,11 @@ ExceptionEvent.prototype.uncaught = function() {
};
+ExceptionEvent.prototype.promise = function() {
+ return this.promise_;
+};
+
+
ExceptionEvent.prototype.func = function() {
return this.exec_state_.frame(0).func();
};
« no previous file with comments | « src/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698