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

Unified Diff: chrome/renderer/plugin_channel_host.cc

Issue 375005: When a plugin calls NPN_SetException, pass the exception along to every rende... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/renderer/plugin_channel_host.h ('k') | chrome/test/data/npapi/npobject_set_exception.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugin_channel_host.cc
===================================================================
--- chrome/renderer/plugin_channel_host.cc (revision 32119)
+++ chrome/renderer/plugin_channel_host.cc (working copy)
@@ -6,6 +6,8 @@
#include "chrome/common/plugin_messages.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
+
// A simple MessageFilter that will ignore all messages and respond to sync
// messages with an error when is_listening_ is false.
class IsListeningFilter : public IPC::ChannelProxy::MessageFilter {
@@ -107,6 +109,17 @@
PluginChannelBase::RemoveRoute(route_id);
}
+void PluginChannelHost::OnControlMessageReceived(const IPC::Message& message) {
+ IPC_BEGIN_MESSAGE_MAP(PluginChannelHost, message)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_SetException, OnSetException)
+ IPC_MESSAGE_UNHANDLED_ERROR()
+ IPC_END_MESSAGE_MAP()
+}
+
+void PluginChannelHost::OnSetException(const std::string& message) {
+ WebKit::WebBindings::setException(NULL, message.c_str());
+}
+
void PluginChannelHost::OnChannelError() {
PluginChannelBase::OnChannelError();
« no previous file with comments | « chrome/renderer/plugin_channel_host.h ('k') | chrome/test/data/npapi/npobject_set_exception.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698