- 07 Sep, 2017 1 commit
-
-
Sathya Gunasekaran authored
The spec calls out to Promise.prototype.then and also passes around the constructor of the receiver to Promise.prototype.finally. Adds a new constructor slot to PromiseFinallyContext enum and this is used to create a new promise in the thenFinally/catchFinally callbacks. Created a new PromiseResolve TFS builtin refactored from the existing PromiseResolve builtin. PromiseResolveWrapper calls out to this TFS Builtin and is now exposed as Promise.resolve. The thenFinally and catchFinally callbacks also call out to the PromiseResolve TFS builtin. Spec -- https://tc39.github.io/proposal-promise-finally/ Bug: v8:5967 Change-Id: I2ce89f14d3b149619d11e424b6e37062e466c4d5 Reviewed-on: https://chromium-review.googlesource.com/652026Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#47898}
-
- 26 Jul, 2017 1 commit
-
-
Sathya Gunasekaran authored
- No need for multiple assertAsyncRan() calls, just do t.plan(count) - Previously, if you forget to call assertAsyncRan(), the test will still pass, which is no longer true. - No longer hold global state (with asyncAssertsExpected). Previously if one assert wasn't hit then there's no way to find out which test failed. You'd have to comment each test and try again. - Each test runs independently in the microtask queue. - Better failure reporting by printing the entire function. Example error : === mjsunit/harmony/promise-prototype-finally === abort: Expected asserts: 2, Actual asserts: 1 in test: reject/finally/then assert => { assert.plan(2); Promise.reject(3).finally().then( assert.unreachable, x => { assert.equals(3, x); }); } Change-Id: Ic3f6272e1e87b8b0121b8c8c7cce19cf90d1f1be Reviewed-on: https://chromium-review.googlesource.com/455555 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Daniel Ehrenberg <littledan@chromium.org> Reviewed-by: Caitlin Potter <caitp@igalia.com> Cr-Commit-Position: refs/heads/master@{#46910}
-
- 17 Feb, 2017 1 commit
-
-
gsathya authored
Adds five new TF builtins for the spec defined functions/closures. This follows mechanism similar to promise resolving functions approach where we store the closure variables in a custom context. Adds a new --harmony-promise-finally flag. BUG=v8:5967 Review-Url: https://codereview.chromium.org/2695753002 Cr-Commit-Position: refs/heads/master@{#43294}
-