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

Unified Diff: media/mojo/services/mojo_renderer_service.cc

Issue 2530613003: media: Fix lifetime of InterfaceFactoryImpl and created impls (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mojo/services/mojo_renderer_service.cc
diff --git a/media/mojo/services/mojo_renderer_service.cc b/media/mojo/services/mojo_renderer_service.cc
index 22c9a833377e2c420ca172243b351f1f9eb849af..581db6f27793cfa424475bac8090e3f3c553a00d 100644
--- a/media/mojo/services/mojo_renderer_service.cc
+++ b/media/mojo/services/mojo_renderer_service.cc
@@ -271,7 +271,10 @@ void MojoRendererService::InitiateScopedSurfaceRequest(
// |renderer_| is likely not of type MediaPlayerRenderer.
// This is an unexpected call, and the connection should be closed.
mojo::ReportBadMessage("Unexpected call to InitiateScopedSurfaceRequest.");
- binding_->Close();
+
+ if (binding_)
+ binding_->Close();
xhwang 2016/11/23 22:27:09 tguilbert: Today the |binding_| is a StrongBindin
tguilbert 2016/11/23 23:45:06 I originally used a base::Optional<UnguessableToke
xhwang 2016/11/29 10:20:57 tguilbert: I have a solution to use a bad_message
tguilbert 2016/11/29 19:05:33 We discussed offline. I agree with everything that
+
return;
}

Powered by Google App Engine
This is Rietveld 408576698