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

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: 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
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index d759fe5df118b0d12a3b8110881ce9875f026046..b56f71856de563ebc37b62690425ab56718700e1 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 };
// 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, deferred_promise) {
rossberg 2014/04/24 07:27:36 And here...
+ return new ExceptionEvent(exec_state, exception, uncaught, deferred_promise);
}
-function ExceptionEvent(exec_state, exception, uncaught) {
+function ExceptionEvent(exec_state, exception, uncaught, deferred_promise) {
this.exec_state_ = exec_state;
this.exception_ = exception;
this.uncaught_ = uncaught;
+ this.deferred_promise_ = deferred_promise;
}
@@ -1125,6 +1127,11 @@ ExceptionEvent.prototype.uncaught = function() {
};
+ExceptionEvent.prototype.deferred_promise = function() {
rossberg 2014/04/24 07:27:36 And so on...
+ return this.deferred_promise_;
+};
+
+
ExceptionEvent.prototype.func = function() {
return this.exec_state_.frame(0).func();
};

Powered by Google App Engine
This is Rietveld 408576698