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

Issue 174053003: Task Management - Handle Promises "Then" or "Catch" callback case. (Closed)

Created:
6 years, 10 months ago by robliao
Modified:
6 years, 8 months ago
Reviewers:
vadimt, rgustafson, skare_
CC:
chromium-reviews, arv+watch_chromium.org
Visibility:
Public.

Description

Task Management - Handle Promises "Then" or "Catch" callback case. This CL will be merged into https://codereview.chromium.org/162273002/ when we are ready to submit.

Patch Set 1 #

Patch Set 2 : Bug Fix #

Total comments: 3

Patch Set 3 : Rebase to r252941 #

Patch Set 4 : CR Feedback #

Patch Set 5 : Promise Tracking 2 #

Total comments: 15

Patch Set 6 : Modify Comments #

Total comments: 2

Patch Set 7 : Theoretical Bug Fix and CR Feedback #

Total comments: 13

Patch Set 8 : CR Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -15 lines) Patch
M chrome/browser/resources/google_now/utility.js View 1 2 3 4 5 6 7 1 chunk +175 lines, -15 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
robliao
6 years, 10 months ago (2014-02-20 18:52:02 UTC) #1
robliao
Added a bug fix and ping!
6 years, 10 months ago (2014-02-21 19:06:49 UTC) #2
robliao
Rebase to r252941
6 years, 10 months ago (2014-02-24 18:31:30 UTC) #3
skare_
lgtm
6 years, 10 months ago (2014-02-24 19:53:59 UTC) #4
rgustafson
https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js#newcode504 chrome/browser/resources/google_now/utility.js:504: this.__promiseId = promiseId; Still kinda confused in general by ...
6 years, 10 months ago (2014-02-24 21:55:11 UTC) #5
robliao
https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js#newcode504 chrome/browser/resources/google_now/utility.js:504: this.__promiseId = promiseId; You're right in the general case ...
6 years, 10 months ago (2014-02-24 22:31:13 UTC) #6
robliao
https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/90001/chrome/browser/resources/google_now/utility.js#newcode504 chrome/browser/resources/google_now/utility.js:504: this.__promiseId = promiseId; Added a comment about this limitation. ...
6 years, 10 months ago (2014-02-24 23:11:56 UTC) #7
rgustafson
lgtm
6 years, 10 months ago (2014-02-24 23:22:19 UTC) #8
robliao
vadimt: Please provide owner approval for this patch.
6 years, 10 months ago (2014-02-24 23:32:33 UTC) #9
vadimt
On 2014/02/24 23:32:33, robliao wrote: > vadimt: Please provide owner approval for this patch. May ...
6 years, 10 months ago (2014-02-24 23:47:17 UTC) #10
robliao
The trick here is a promise can have multiple thens and multiple catch statements like ...
6 years, 10 months ago (2014-02-25 00:29:33 UTC) #11
robliao
Refactored to not change the task manager.
6 years, 10 months ago (2014-02-25 22:08:56 UTC) #12
vadimt
https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js#newcode543 chrome/browser/resources/google_now/utility.js:543: callbacksToClear[i](); It's not clear why we need to invoke ...
6 years, 10 months ago (2014-02-25 22:36:48 UTC) #13
robliao
https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js#newcode543 chrome/browser/resources/google_now/utility.js:543: callbacksToClear[i](); The comment says it clears the tracker in ...
6 years, 10 months ago (2014-02-25 22:43:13 UTC) #14
robliao
https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js#newcode562 chrome/browser/resources/google_now/utility.js:562: var handler = wrapper.wrapCallback(function() { Also, calling wrapCallback once ...
6 years, 10 months ago (2014-02-25 22:51:13 UTC) #15
vadimt
https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js#newcode538 chrome/browser/resources/google_now/utility.js:538: tracker.callbacks = []; It's worth adding a comment that ...
6 years, 10 months ago (2014-02-25 23:20:21 UTC) #16
robliao
https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/250001/chrome/browser/resources/google_now/utility.js#newcode538 chrome/browser/resources/google_now/utility.js:538: tracker.callbacks = []; On 2014/02/25 23:20:22, vadimt wrote: > ...
6 years, 10 months ago (2014-02-25 23:39:53 UTC) #17
vadimt
https://codereview.chromium.org/174053003/diff/280002/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/280002/chrome/browser/resources/google_now/utility.js#newcode543 chrome/browser/resources/google_now/utility.js:543: setTimeout(function() { Please make sure setTimeout keeps event page ...
6 years, 10 months ago (2014-02-26 00:31:46 UTC) #18
robliao
https://codereview.chromium.org/174053003/diff/280002/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/280002/chrome/browser/resources/google_now/utility.js#newcode543 chrome/browser/resources/google_now/utility.js:543: setTimeout(function() { Cute trick with the promise. On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 00:58:36 UTC) #19
vadimt
lgtm https://codereview.chromium.org/174053003/diff/290001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/290001/chrome/browser/resources/google_now/utility.js#newcode543 chrome/browser/resources/google_now/utility.js:543: originalThen.call(Promise.resolve(), function() { WOW!
6 years, 10 months ago (2014-02-26 01:03:57 UTC) #20
robliao
skare and rgustafson: There have been some significant changes since you lg'ed. Feel free to ...
6 years, 10 months ago (2014-02-26 01:05:44 UTC) #21
rgustafson
I still haven't actually reviewed for code correctness since everything changed... but submit if you ...
6 years, 10 months ago (2014-02-26 18:31:03 UTC) #22
robliao
https://codereview.chromium.org/174053003/diff/290001/chrome/browser/resources/google_now/utility.js File chrome/browser/resources/google_now/utility.js (right): https://codereview.chromium.org/174053003/diff/290001/chrome/browser/resources/google_now/utility.js#newcode470 chrome/browser/resources/google_now/utility.js:470: * arguments or the 'catch' arguemnts will be processed, ...
6 years, 10 months ago (2014-02-26 18:46:17 UTC) #23
robliao
6 years, 10 months ago (2014-02-26 21:24:04 UTC) #24
Message was sent while issue was closed.
Merged into https://codereview.chromium.org/162273002/

Powered by Google App Engine
This is Rietveld 408576698