Settings: default browser browser proxy isn't actually using promise as expected |
|||||
Issue descriptionhttps://cs.chromium.org/chromium/src/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js?type=cs&q=default_browser_browser&sq=package:chromium&g=0&l=43 The C++ is actually calling FireWebUICallback instead of resolving promise, so the "then" here: https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/default_browser_page/default_browser_page.js?type=cs&sq=package:chromium&g=0&l=43-44 Isn't actually doing anything.
,
Sep 10
,
Sep 13
,
Sep 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7452b6d603bf36830ef04f5f064e9d81da2bd4db commit 7452b6d603bf36830ef04f5f064e9d81da2bd4db Author: Scott Chen <scottchen@chromium.org> Date: Sat Sep 15 01:55:58 2018 Settings: remove unused promise in default browser page. Bug: 874520 Change-Id: Ie80dd997a5a975d29811158a9a9c4e339d88a6bd Reviewed-on: https://chromium-review.googlesource.com/1226510 Commit-Queue: Scott Chen <scottchen@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#591557} [modify] https://crrev.com/7452b6d603bf36830ef04f5f064e9d81da2bd4db/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.js [modify] https://crrev.com/7452b6d603bf36830ef04f5f064e9d81da2bd4db/chrome/browser/resources/settings/default_browser_page/default_browser_page.js [modify] https://crrev.com/7452b6d603bf36830ef04f5f064e9d81da2bd4db/chrome/test/data/webui/settings/default_browser_browsertest.js
,
Oct 2
,
Oct 24
Re-opening this. We originally wanted to convert the backend code to be able to resolve a cr.sendWithPromise, but tommycli@ pointed out a theoretically-possible race condition, so we removed the frontend promise usage instead. Now, another frontend element[1] also needs to use the same logic and the code is more complex than necessary. Upon further investigating, we noticed that the usage flow doesn't allow for the theoretic race condition to happen (i.e. setDefaultBrowser cannot be called while still waiting for requestDefaultBrowserStatus to resolve), so reopening this bug for a second attempt to make the backend work with a promise instead. [1]https://chromium-review.googlesource.com/c/chromium/src/+/1297283 |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by scottchen@chromium.org
, Aug 21Owner: scottchen@chromium.org
Status: Started (was: Available)