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

Unified Diff: chrome/plugin/npobject_util.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/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/npobject_util.cc
===================================================================
--- chrome/plugin/npobject_util.cc (revision 32119)
+++ chrome/plugin/npobject_util.cc (working copy)
@@ -84,9 +84,16 @@
}
-static void NPN_SetExceptionPatch(NPObject *obj,
- const NPUTF8 *message) {
- return NPObjectProxy::NPNSetException(obj, message);
+static void NPN_SetExceptionPatch(NPObject *obj, const NPUTF8 *message) {
+ std::string message_str(message);
+ if (IsPluginProcess()) {
+ PluginChannelBase* renderer_channel =
+ PluginChannelBase::GetCurrentChannel();
+ if (renderer_channel)
+ renderer_channel->Send(new PluginHostMsg_SetException(message_str));
+ } else {
+ WebBindings::setException(obj, message_str.c_str());
+ }
}
static bool NPN_EnumeratePatch(NPP npp, NPObject *obj,
« no previous file with comments | « chrome/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698