diff options
-rw-r--r-- | content/renderer/presentation/presentation_dispatcher.cc | 2 | ||||
-rw-r--r-- | extensions/renderer/resources/media_router_bindings.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc index c79b6e3..df8f970 100644 --- a/content/renderer/presentation/presentation_dispatcher.cc +++ b/content/renderer/presentation/presentation_dispatcher.cc @@ -402,7 +402,7 @@ void PresentationDispatcher::OnConnectionClosed( presentation::PresentationSessionInfoPtr connection, presentation::PresentationConnectionCloseReason reason, const mojo::String& message) { - if (controller_) + if (!controller_) return; DCHECK(!connection.is_null()); 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); }; /** |