Revert 273547 "Reset scoped_ptr to make plugin crash before ente..."

> Reset scoped_ptr to make plugin crash before entering engine_->HandleDocumentLoad, if called for deleted "Instance".
> Suspecting method call for deleted instance.
> 
> Example to explain why reset() makes difference:
> 
> scoped_ptr<int>* pt = NULL;
> {
>   scoped_ptr<int> t(new int);
>   pt = &t;
> }
> DCHECK(!(*pt));  // Fail
> {
>   scoped_ptr<int> t(new int);
>   pt = &t;
>   t.reset();
> }
> DCHECK(!(*pt)); // OK
> 
> BUG=372095,372548
> 
> Review URL: https://codereview.chromium.org/300403002

TBR=vitalybuka@chromium.org

Review URL: https://codereview.chromium.org/318743003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274854 0039d316-1c4b-4281-b951-d872f2087c98
parent 68c88b0f
...@@ -308,10 +308,6 @@ Instance::Instance(PP_Instance instance) ...@@ -308,10 +308,6 @@ Instance::Instance(PP_Instance instance)
Instance::~Instance() { Instance::~Instance() {
RemovePerInstanceObject(kPPPPdfInterface, this); RemovePerInstanceObject(kPPPPdfInterface, this);
// TODO(vitalybuka): remove after crbug.com/372095 fixed.
// Reset to NULL to make it crash in HandleDocumentLoad if called for
// deleted instance. scoped_ptr::~scoped_ptr does not reset pointer to NULL.
engine_.reset();
} }
bool Instance::Init(uint32_t argc, const char* argn[], const char* argv[]) { bool Instance::Init(uint32_t argc, const char* argn[], const char* argv[]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment