diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/plugin/npobject_proxy.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/content/plugin/npobject_proxy.cc b/content/plugin/npobject_proxy.cc index 4a59b6b..8772b2a 100644 --- a/content/plugin/npobject_proxy.cc +++ b/content/plugin/npobject_proxy.cc @@ -68,11 +68,14 @@ NPObjectProxy::NPObjectProxy( NPObjectProxy::~NPObjectProxy() { if (channel_.get()) { + // This NPObjectProxy instance is now invalid and should not be reused for + // requests initiated by plugins. We may receive requests for the + // same NPObject in the context of the outgoing NPObjectMsg_Release call. + // We should be creating new NPObjectProxy instances to wrap these + // NPObjects. + channel_->RemoveMappingForNPObjectProxy(route_id_); + channel_->RemoveRoute(route_id_); Send(new NPObjectMsg_Release(route_id_)); - if (channel_.get()) { - channel_->RemoveRoute(route_id_); - channel_->RemoveMappingForNPObjectProxy(route_id_); - } } } |