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

Unified Diff: components/nacl/browser/nacl_host_message_filter.cc

Issue 1145013004: Introduce bad_message.h for chrome and NaCl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « components/nacl/browser/nacl_file_host.cc ('k') | content/browser/appcache/appcache_dispatcher_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_host_message_filter.cc
diff --git a/components/nacl/browser/nacl_host_message_filter.cc b/components/nacl/browser/nacl_host_message_filter.cc
index 8ebfed40115abf896cf2b98e6b50ccfa1f22ff6c..d7811595042ae69ffd762dfbe2c7ff9eb6c1d9d5 100644
--- a/components/nacl/browser/nacl_host_message_filter.cc
+++ b/components/nacl/browser/nacl_host_message_filter.cc
@@ -5,6 +5,7 @@
#include "components/nacl/browser/nacl_host_message_filter.h"
#include "base/sys_info.h"
+#include "components/nacl/browser/bad_message.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/nacl_file_host.h"
#include "components/nacl/browser/nacl_process_host.h"
@@ -156,7 +157,9 @@ void NaClHostMessageFilter::LaunchNaClContinuation(
content::RenderViewHost* rvh = content::RenderViewHost::FromID(
render_process_id(), launch_params.render_view_id);
if (!rvh) {
- BadMessageReceived(); // Kill the renderer.
+ bad_message::ReceivedBadMessage(
+ this, bad_message::NHMF_LAUNCH_CONTINUATION_BAD_ROUTING_ID);
+ delete reply_msg;
return;
}
@@ -358,7 +361,8 @@ void NaClHostMessageFilter::OnGetNexeFd(
if (!cache_info.pexe_url.is_valid()) {
LOG(ERROR) << "Bad URL received from GetNexeFd: " <<
cache_info.pexe_url.possibly_invalid_spec();
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this,
+ bad_message::NHMF_GET_NEXE_FD_BAD_URL);
return;
}
« no previous file with comments | « components/nacl/browser/nacl_file_host.cc ('k') | content/browser/appcache/appcache_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698