Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2426)

Unified Diff: pdf/instance.cc

Issue 300403002: Reset scoped_ptr to make plugin crash on higher level. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index a17db57ae93d77014202fabde522aa94551f28b2..7e626484ae7ee0a33fe808ba524ed32938851aee 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -308,6 +308,10 @@ Instance::Instance(PP_Instance instance)
Instance::~Instance() {
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[]) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698