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

Unified Diff: chrome/plugin/npobject_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/npobject_stub.h ('k') | chrome/plugin/plugin_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/npobject_stub.cc
===================================================================
--- chrome/plugin/npobject_stub.cc (revision 70108)
+++ chrome/plugin/npobject_stub.cc (working copy)
@@ -62,7 +62,7 @@
return static_cast<IPC::Channel::Listener*>(this);
}
-void NPObjectStub::OnMessageReceived(const IPC::Message& msg) {
+bool NPObjectStub::OnMessageReceived(const IPC::Message& msg) {
child_process_logging::SetActiveURL(page_url_);
if (!npobject_) {
@@ -74,9 +74,10 @@
Send(reply);
}
- return;
+ return true;
}
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NPObjectStub, msg)
IPC_MESSAGE_HANDLER_DELAY_REPLY(NPObjectMsg_Release, OnRelease);
IPC_MESSAGE_HANDLER(NPObjectMsg_HasMethod, OnHasMethod);
@@ -89,8 +90,10 @@
IPC_MESSAGE_HANDLER(NPObjectMsg_Enumeration, OnEnumeration);
IPC_MESSAGE_HANDLER_DELAY_REPLY(NPObjectMsg_Construct, OnConstruct);
IPC_MESSAGE_HANDLER_DELAY_REPLY(NPObjectMsg_Evaluate, OnEvaluate);
- IPC_MESSAGE_UNHANDLED_ERROR()
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+ DCHECK(handled);
+ return handled;
}
void NPObjectStub::OnChannelError() {
« no previous file with comments | « chrome/plugin/npobject_stub.h ('k') | chrome/plugin/plugin_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698