Index: src/debug-debugger.js |
diff --git a/src/debug-debugger.js b/src/debug-debugger.js |
index 78f3396a3da141754eddd76def962b5dd2249ab5..a4c8801ea6d4d52a14a44f328d7e7de1e60aab30 100644 |
--- a/src/debug-debugger.js |
+++ b/src/debug-debugger.js |
@@ -1202,68 +1202,35 @@ function MakeScriptObject_(script, include_source) { |
function MakePromiseEvent(event_data) { |
- if (event_data.type == "new") { |
- return new NewPromiseEvent(event_data); |
- } |
- if (event_data.type == "update") { |
- return new UpdatePromiseStatusEvent(event_data); |
- } |
- if (event_data.type == "chain") { |
- return new UpdatePromiseParentEvent(event_data); |
- } |
-} |
- |
- |
-function PromiseGetter() { |
- return MakeMirror(this.promise_); |
-} |
- |
- |
-function NewPromiseEvent(event_data) { |
- this.resolver_ = event_data.resolver; |
- this.promise_ = event_data.promise; |
-} |
- |
- |
-NewPromiseEvent.prototype.promise = PromiseGetter; |
- |
- |
-NewPromiseEvent.prototype.resolver = function() { |
- return MakeMirror(this.resolver_); |
+ return new PromiseEvent(event_data); |
} |
-function UpdatePromiseStatusEvent(event_data) { |
+function PromiseEvent(event_data) { |
this.promise_ = event_data.promise; |
+ this.parentPromise_ = event_data.parentPromise; |
this.status_ = event_data.status; |
this.value_ = event_data.value; |
} |
-UpdatePromiseStatusEvent.prototype.promise = PromiseGetter; |
- |
- |
-UpdatePromiseStatusEvent.prototype.status = function() { |
- return this.status_; |
+PromiseEvent.prototype.promise = function() { |
+ return MakeMirror(this.promise_); |
} |
-UpdatePromiseStatusEvent.prototype.value = function() { |
- return MakeMirror(this.value_); |
+PromiseEvent.prototype.parentPromise = function() { |
+ return MakeMirror(this.parentPromise_); |
} |
-function UpdatePromiseParentEvent(event_data) { |
- this.promise_ = event_data.promise; |
- this.parentPromise_ = event_data.parentPromise; |
+PromiseEvent.prototype.status = function() { |
+ return this.status_; |
} |
-UpdatePromiseParentEvent.prototype.promise = PromiseGetter; |
- |
- |
-UpdatePromiseParentEvent.prototype.parentPromise = function() { |
- return MakeMirror(this.parentPromise_); |
+PromiseEvent.prototype.value = function() { |
+ return MakeMirror(this.value_); |
} |