diff options
author | Raymes Khoury <raymes@chromium.org> | 2015-05-20 12:44:35 +1000 |
---|---|---|
committer | Raymes Khoury <raymes@chromium.org> | 2015-05-20 02:45:25 +0000 |
commit | 6c7398af22bba93ac0de286ae9b9a52c76256ad0 (patch) | |
tree | e1215964e0e202f3368db129453cabe0289ca9c3 | |
parent | 59495481b1ff51a626d93bc8f4895cd8c675c893 (diff) | |
download | chromium_src-6c7398af22bba93ac0de286ae9b9a52c76256ad0.zip chromium_src-6c7398af22bba93ac0de286ae9b9a52c76256ad0.tar.gz chromium_src-6c7398af22bba93ac0de286ae9b9a52c76256ad0.tar.bz2 |
Explicitly destroy PDFEngine in OutOfProcessInstance destructor
During destruction, pdfium may call back into the instance and access members.
It would be better if this didn't happen but it isn't strictly wrong and may
be necessary as it appears pdfium can run scripts at shutdown.
BUG=485855
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1144923002
Cr-Commit-Position: refs/heads/master@{#330684}
-rw-r--r-- | pdf/out_of_process_instance.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index d8188ad..265c53f 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -295,6 +295,9 @@ OutOfProcessInstance::OutOfProcessInstance(PP_Instance instance) OutOfProcessInstance::~OutOfProcessInstance() { RemovePerInstanceObject(kPPPPdfInterface, this); + // Explicitly reset the PDFEngine during destruction as it may call back into + // this object. + engine_.reset(); } bool OutOfProcessInstance::Init(uint32_t argc, |