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

Unified Diff: content/renderer/presentation/presentation_dispatcher.cc

Issue 1118103002: Implements ListenForSessionMessages in PresentationServiceImpl; uses Swap to avoid copying large da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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
« no previous file with comments | « content/public/browser/presentation_session_message.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/presentation/presentation_dispatcher.cc
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index c07f2658e2a5b2bc045bee6a321cf72bc256df5e..50759293cf7973ce2f82bc0774984896143535e6 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -213,7 +213,8 @@ void PresentationDispatcher::OnSessionStateChange(
void PresentationDispatcher::OnSessionMessagesReceived(
mojo::Array<presentation::SessionMessagePtr> messages) {
- if (!controller_)
+ // When messages is null, there is an error at presentation service side.
+ if (!controller_ || messages.is_null())
return;
for (size_t i = 0; i < messages.size(); ++i) {
« no previous file with comments | « content/public/browser/presentation_session_message.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698