-
- Downloads
Promise: Add tests to disallow faulty optimization
Add tests that assert behavior when a Promise is resolved with another Promise whose `then` method has been overridden. Because all objects with a `then` method are treated equivalently, the presence of a [[PromiseState]] internal slot should have no effect on program behavior. These tests guard against a faulty optimization originally implemented in V8: https://bugs.chromium.org/p/v8/issues/detail?id=3641
Showing
- test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js 55 additions, 0 deletions...rototype/then/resolve-pending-fulfilled-prms-cstm-then.js
- test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js 56 additions, 0 deletions...prototype/then/resolve-pending-rejected-prms-cstm-then.js
- test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js 59 additions, 0 deletions...rototype/then/resolve-settled-fulfilled-prms-cstm-then.js
- test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js 59 additions, 0 deletions...prototype/then/resolve-settled-rejected-prms-cstm-then.js
- test/built-ins/Promise/race/resolve-prms-cstm-then.js 52 additions, 0 deletionstest/built-ins/Promise/race/resolve-prms-cstm-then.js
- test/built-ins/Promise/resolve-prms-cstm-then-deferred.js 48 additions, 0 deletionstest/built-ins/Promise/resolve-prms-cstm-then-deferred.js
- test/built-ins/Promise/resolve-prms-cstm-then-immed.js 55 additions, 0 deletionstest/built-ins/Promise/resolve-prms-cstm-then-immed.js
- test/built-ins/Promise/resolve/resolve-prms-cstm-then.js 40 additions, 0 deletionstest/built-ins/Promise/resolve/resolve-prms-cstm-then.js
Please register or sign in to comment