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

Issue 2053743002: [Media Router WebUI] Prevent error when route becomes null (Closed)

Created:
4 years, 6 months ago by btolsch
Modified:
4 years, 6 months ago
Reviewers:
apacible
CC:
chromium-reviews, media-router+watch_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router WebUI] Prevent error when route becomes null Once the route-details element is stamped, getSinkForRoute_ is bound to currentRoute_. This becomes null if the route is stopped which causes getSinkForRoute_ to throw an innocuous but noisy error. This change adds a check of the route before dereferencing it. BUG=614144 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/16bc9a232bd6ef00891eb061687d23f77ee29efd Cr-Commit-Position: refs/heads/master@{#399281}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Return null instead of undefined #

Total comments: 1

Patch Set 3 : Remove undefined from closure type #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
btolsch
PTAL, thanks!
4 years, 6 months ago (2016-06-09 18:22:22 UTC) #3
apacible
https://codereview.chromium.org/2053743002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2053743002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode1185 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:1185: return route ? this.sinkMap_[route.sinkId] : undefined; Does this have ...
4 years, 6 months ago (2016-06-10 20:19:17 UTC) #4
btolsch
https://codereview.chromium.org/2053743002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2053743002/diff/1/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode1185 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:1185: return route ? this.sinkMap_[route.sinkId] : undefined; On 2016/06/10 20:19:17, ...
4 years, 6 months ago (2016-06-10 20:36:55 UTC) #5
apacible
lgtm https://codereview.chromium.org/2053743002/diff/20001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js File chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js (right): https://codereview.chromium.org/2053743002/diff/20001/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js#newcode1181 chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js:1181: * @return {?media_router.Sink|undefined} Sink associated with |route| or ...
4 years, 6 months ago (2016-06-10 20:51:47 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2053743002/40001
4 years, 6 months ago (2016-06-10 20:55:46 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-10 21:48:32 UTC) #10
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-10 21:48:47 UTC) #11
commit-bot: I haz the power
4 years, 6 months ago (2016-06-10 21:51:06 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/16bc9a232bd6ef00891eb061687d23f77ee29efd
Cr-Commit-Position: refs/heads/master@{#399281}

Powered by Google App Engine
This is Rietveld 408576698