Reviewers: danno,
Description:
Revert "Read internal properties [[PromiseStatus]] and [[PromiseValue]] of
the
promise."
This reverts r21266.
[email protected]
Please review this at https://codereview.chromium.org/273423008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -30 lines):
M src/mirror-debugger.js
M test/mjsunit/es6/mirror-promises.js
Index: src/mirror-debugger.js
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js
index
71b29928235ff27f60efbc28bb139d6c78b6ad24..fde3f10f3f181e5adc75e56024133ef3cc35fc02
100644
--- a/src/mirror-debugger.js
+++ b/src/mirror-debugger.js
@@ -798,8 +798,7 @@ ObjectMirror.prototype.toText = function() {
/**
* Return the internal properties of the value, such as [[PrimitiveValue]]
of
- * scalar wrapper objects, properties of the bound function and properties
of
- * the promise.
+ * scalar wrapper objects and properties of the bound function.
* This method is done static to be accessible from Debug API with the bare
* values without mirrors.
* @return {Array} array (possibly empty) of InternalProperty instances
@@ -823,14 +822,6 @@ ObjectMirror.GetInternalProperties = function(value) {
result.push(new InternalPropertyMirror("[[BoundArgs]]", boundArgs));
}
return result;
- } else if (ObjectIsPromise(value)) {
- var mirror = new PromiseMirror(value);
- var result = [];
- result.push(new InternalPropertyMirror("[[PromiseStatus]]",
- mirror.status()));
- result.push(new InternalPropertyMirror("[[PromiseValue]]",
- mirror.promiseValue()));
- return result;
}
return [];
}
Index: test/mjsunit/es6/mirror-promises.js
diff --git a/test/mjsunit/es6/mirror-promises.js
b/test/mjsunit/es6/mirror-promises.js
index
105b91d1be83afcbc384941dd8960151ff23d1bd..5a21a6b9e621487b56745829ad03fbac1b16845f
100644
--- a/test/mjsunit/es6/mirror-promises.js
+++ b/test/mjsunit/es6/mirror-promises.js
@@ -67,23 +67,3 @@ var thrownv = new Promise(function(resolve, reject) {
throw 'throw' });
testPromiseMirror(resolvedv, "resolved", 'resolve');
testPromiseMirror(rejectedv, "rejected", 'reject');
testPromiseMirror(thrownv, "rejected", 'throw');
-
-// Test internal properties of different promises.
-var m1 = debug.MakeMirror(new Promise(
- function(resolve, reject) { resolve(1) }));
-var ip = m1.internalProperties();
-assertEquals(2, ip.length);
-assertEquals("[[PromiseStatus]]", ip[0].name());
-assertEquals("[[PromiseValue]]", ip[1].name());
-assertEquals("resolved", ip[0].value().value());
-assertEquals(1, ip[1].value().value());
-
-var m2 = debug.MakeMirror(new Promise(function(resolve, reject) {
reject(2) }));
-ip = m2.internalProperties();
-assertEquals("rejected", ip[0].value().value());
-assertEquals(2, ip[1].value().value());
-
-var m3 = debug.MakeMirror(new Promise(function(resolve, reject) { }));
-ip = m3.internalProperties();
-assertEquals("pending", ip[0].value().value());
-assertEquals("undefined", typeof(ip[1].value().value()));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.