Index: content/plugin/npobject_stub.cc |
=================================================================== |
--- content/plugin/npobject_stub.cc (revision 98673) |
+++ content/plugin/npobject_stub.cc (working copy) |
@@ -116,9 +116,16 @@ |
if (npobject_) { |
channel_->RemoveMappingForNPObjectStub(route_id_, npobject_); |
+ |
+ // We need to NULL npobject_ prior to calling releaseObject() to avoid |
+ // problems with re-entrancy. See http://crbug.com/94179#c17 for more |
+ // details on how this can happen. |
+ NPObject* npobject = npobject_; |
+ npobject_ = NULL; |
+ |
if (release_npobject) |
- WebBindings::releaseObject(npobject_); |
- npobject_ = NULL; |
+ WebBindings::releaseObject(npobject); |
+ |
MessageLoop::current()->PostTask( |
FROM_HERE, |
NewRunnableFunction( |