From c9e4189c7f733ce0d4984f7295d7359a3fb894b4 Mon Sep 17 00:00:00 2001 From: imcheng Date: Wed, 24 Feb 2016 19:21:17 -0800 Subject: [Media Router] Fix JS error in media_router_bindings.js. Also fix flipped if condition in presentation_dispatcher.cc. error was introduced in previous patch in crrev.com/1701143002. BUG=579360,574233,574234 Review URL: https://codereview.chromium.org/1731153003 Cr-Commit-Position: refs/heads/master@{#377485} --- extensions/renderer/resources/media_router_bindings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/renderer') diff --git a/extensions/renderer/resources/media_router_bindings.js b/extensions/renderer/resources/media_router_bindings.js index 0b0bee0..ebb668c 100644 --- a/extensions/renderer/resources/media_router_bindings.js +++ b/extensions/renderer/resources/media_router_bindings.js @@ -130,7 +130,7 @@ define('media_router_bindings', [ function presentationConnectionCloseReasonToMojo_(reason) { var PresentationConnectionCloseReason = mediaRouterMojom.MediaRouter.PresentationConnectionCloseReason; - switch (state) { + switch (reason) { case 'error': return PresentationConnectionCloseReason.CONNECTION_ERROR; case 'closed': @@ -392,7 +392,7 @@ define('media_router_bindings', [ MediaRouter.prototype.onPresentationConnectionClosed = function(routeId, reason, message) { this.service_.onPresentationConnectionClosed( - routeId, presentationConnectionCloseReasonToMojo_(state), message); + routeId, presentationConnectionCloseReasonToMojo_(reason), message); }; /** -- cgit v1.1