Index: content/common/npobject_util.cc |
=================================================================== |
--- content/common/npobject_util.cc (revision 109161) |
+++ content/common/npobject_util.cc (working copy) |
@@ -87,8 +87,19 @@ |
std::string message_str(message); |
if (IsPluginProcess()) { |
NPChannelBase* renderer_channel = NPChannelBase::GetCurrentChannel(); |
- if (renderer_channel) |
- renderer_channel->Send(new PluginHostMsg_SetException(message_str)); |
+ if (renderer_channel) { |
+ if (obj->_class != NPObjectProxy::npclass()) { |
+ int route_id = MSG_ROUTING_NONE; |
+ // Determine the route id of NPObjectProxy instance in renderer process |
+ // It is the same as the route id of NPObjectStub instance in plugin |
+ // process. |
+ route_id = renderer_channel->GetExistingRouteForNPObjectStub(obj); |
+ renderer_channel->Send(new NPObjectMsg_SetException(route_id, |
+ message_str)); |
+ } else { |
+ renderer_channel->Send(new PluginHostMsg_SetException(message_str)); |
+ } |
+ } |
} else { |
WebBindings::setException(obj, message_str.c_str()); |
} |