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

Unified Diff: chrome/plugin/webplugin_delegate_stub.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_delegate_stub.cc
===================================================================
--- chrome/plugin/webplugin_delegate_stub.cc (revision 70108)
+++ chrome/plugin/webplugin_delegate_stub.cc (working copy)
@@ -88,7 +88,7 @@
}
}
-void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
+bool WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
child_process_logging::SetActiveURL(page_url_);
// A plugin can execute a script to delete itself in any of its NPP methods.
@@ -98,6 +98,7 @@
if (!in_destructor_)
AddRef();
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateStub, msg)
IPC_MESSAGE_HANDLER(PluginMsg_Init, OnInit)
IPC_MESSAGE_HANDLER(PluginMsg_WillSendRequest, OnWillSendRequest)
@@ -146,11 +147,14 @@
IPC_MESSAGE_HANDLER(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle,
OnSetFakeAcceleratedSurfaceWindowHandle)
#endif
- IPC_MESSAGE_UNHANDLED_ERROR()
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
if (!in_destructor_)
Release();
+
+ DCHECK(handled);
+ return handled;
}
bool WebPluginDelegateStub::Send(IPC::Message* msg) {
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698