diff options
author | japhet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 22:29:33 +0000 |
---|---|---|
committer | japhet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 22:29:33 +0000 |
commit | 8275d865da70a68992560db2a5d65bf1b9fa8f56 (patch) | |
tree | 7326a9c416ba2f0a0e3a50ce6ad58693e7ba7c46 /chrome/plugin/npobject_util.cc | |
parent | 91fce0c025e0ff1516d1a8ea762bc4eab326b8de (diff) | |
download | chromium_src-8275d865da70a68992560db2a5d65bf1b9fa8f56.zip chromium_src-8275d865da70a68992560db2a5d65bf1b9fa8f56.tar.gz chromium_src-8275d865da70a68992560db2a5d65bf1b9fa8f56.tar.bz2 |
If an NP_* function is called on an out of process plugin, save enough info to send an NPN_SetException back to the correct renderer if necessary. BUG=26764 TEST=none
Review URL: http://codereview.chromium.org/375005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/npobject_util.cc')
-rw-r--r-- | chrome/plugin/npobject_util.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/plugin/npobject_util.cc b/chrome/plugin/npobject_util.cc index 7594225..229a984 100644 --- a/chrome/plugin/npobject_util.cc +++ b/chrome/plugin/npobject_util.cc @@ -84,9 +84,16 @@ static bool NPN_EvaluatePatch(NPP npp, } -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, |