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

Issue 2001283006: Promises: Rename functions/parameters to match spec (Closed)

Created:
4 years, 7 months ago by gsathya
Modified:
4 years, 7 months ago
Reviewers:
Dan Ehrenberg, adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

This patch updates certain functions and parameters to match the Promise spec. Committed: https://crrev.com/ffdd76e61be3010d7fad2f280fa09d8abfe298f6 Cr-Commit-Position: refs/heads/master@{#36535}

Patch Set 1 #

Patch Set 2 : Rename executor #

Total comments: 8

Patch Set 3 : fix anchor link #

Total comments: 4

Patch Set 4 : Address comments #

Total comments: 1

Patch Set 5 : Remove quotes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M src/js/promise.js View 1 2 3 4 9 chunks +21 lines, -21 lines 2 comments Download

Messages

Total messages: 30 (11 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2001283006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2001283006/1
4 years, 7 months ago (2016-05-25 19:14:30 UTC) #2
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-25 19:16:40 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2001283006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2001283006/20001
4 years, 7 months ago (2016-05-25 19:16:50 UTC) #5
gsathya
4 years, 7 months ago (2016-05-25 19:28:52 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-25 19:47:36 UTC) #11
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-25 19:47:45 UTC) #12
adamk
https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js#newcode165 src/js/promise.js:165: function PromiseNoopResolver() {} This one doesn't seem spec related? ...
4 years, 7 months ago (2016-05-25 20:57:26 UTC) #13
gsathya
Thanks for the review! PTAL https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js#newcode165 src/js/promise.js:165: function PromiseNoopResolver() {} On ...
4 years, 7 months ago (2016-05-25 23:09:24 UTC) #14
adamk
https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js#newcode165 src/js/promise.js:165: function PromiseNoopResolver() {} On 2016/05/25 23:09:24, gsathya wrote: > ...
4 years, 7 months ago (2016-05-25 23:19:18 UTC) #15
gsathya
https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2001283006/diff/20001/src/js/promise.js#newcode165 src/js/promise.js:165: function PromiseNoopResolver() {} On 2016/05/25 23:19:18, adamk wrote: > ...
4 years, 7 months ago (2016-05-25 23:53:07 UTC) #16
adamk
lgtm % smallest possible nit below https://codereview.chromium.org/2001283006/diff/60001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2001283006/diff/60001/src/js/promise.js#newcode182 src/js/promise.js:182: // "Promise Resolve ...
4 years, 7 months ago (2016-05-25 23:55:25 UTC) #17
gsathya
On 2016/05/25 23:55:25, adamk wrote: > lgtm % smallest possible nit below > > https://codereview.chromium.org/2001283006/diff/60001/src/js/promise.js ...
4 years, 7 months ago (2016-05-25 23:57:12 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2001283006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2001283006/80001
4 years, 7 months ago (2016-05-25 23:57:39 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-26 00:26:08 UTC) #22
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-26 00:26:09 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2001283006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2001283006/80001
4 years, 7 months ago (2016-05-26 16:28:02 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-26 16:29:48 UTC) #27
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/ffdd76e61be3010d7fad2f280fa09d8abfe298f6 Cr-Commit-Position: refs/heads/master@{#36535}
4 years, 7 months ago (2016-05-26 16:32:36 UTC) #29
Dan Ehrenberg
4 years, 7 months ago (2016-05-27 08:22:58 UTC) #30
Message was sent while issue was closed.
I like how this patch fixes up the names of some local variables, but I'm not a
big fan of the function renamings. Our Promise code is simply factored
differently from the spec, ultimately to reduce code duplication. If we want it
to correspond better, then we either need to refactor this code or the spec; I
think these function renamings just add to the confusion.

https://codereview.chromium.org/2001283006/diff/80001/src/js/promise.js
File src/js/promise.js (left):

https://codereview.chromium.org/2001283006/diff/80001/src/js/promise.js#oldco...
src/js/promise.js:121: function PromiseDone(promise, status, value,
promiseQueue) {
I'm not a big fan of this name change. This is a function which doesn't directly
correspond to anything in the spec, as it takes the PromiseQueue as an argument.
Maybe you could make a helper function called FulfillPromise which calls
PromiseDone with the right promiseQueue.

https://codereview.chromium.org/2001283006/diff/80001/src/js/promise.js
File src/js/promise.js (right):

https://codereview.chromium.org/2001283006/diff/80001/src/js/promise.js#newco...
src/js/promise.js:182: // Promise Resolve Functions, steps 6-13
As your comment says, the contents of this function don't correspond to promise
resolve functions either--only part of it. The code here is simply factored
differently from the spec. I am not a big fan of the name ResolvePromise as it
sounds a lot like PromiseResolve, which is Promise.prototype.resolve, whereas
FulfillPromise is something that appears in the spec which this largely
corresponds to.

Powered by Google App Engine
This is Rietveld 408576698