Commit 6c7398af authored by Raymes Khoury's avatar Raymes Khoury

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}
parent 59495481
...@@ -295,6 +295,9 @@ OutOfProcessInstance::OutOfProcessInstance(PP_Instance instance) ...@@ -295,6 +295,9 @@ OutOfProcessInstance::OutOfProcessInstance(PP_Instance instance)
OutOfProcessInstance::~OutOfProcessInstance() { OutOfProcessInstance::~OutOfProcessInstance() {
RemovePerInstanceObject(kPPPPdfInterface, this); 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, bool OutOfProcessInstance::Init(uint32_t argc,
......
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