summaryrefslogtreecommitdiffstats
path: root/pdf
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 08:52:05 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 08:53:27 +0000
commitd1e2c63c639416e48406665bca0b3bbf681a95dd (patch)
tree4a9c3e3901f1bca098a2b146c64cc69cfb7e165f /pdf
parentac3446d6ac226d50678a8cc67bb0019e0d82e861 (diff)
downloadchromium_src-d1e2c63c639416e48406665bca0b3bbf681a95dd.zip
chromium_src-d1e2c63c639416e48406665bca0b3bbf681a95dd.tar.gz
chromium_src-d1e2c63c639416e48406665bca0b3bbf681a95dd.tar.bz2
Fix crasher in the pdf tear down code path.
The crash occurs because of a timer dereferencing a null engine pointer. The crash appears to have occurred due to this patch https://codereview.chromium.org/427583003/ Fix is to cancel all timers when the pdf instance is being torn down before destroying the engine. BUG=403036 Review URL: https://codereview.chromium.org/462283002 Cr-Commit-Position: refs/heads/master@{#289218} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'pdf')
-rw-r--r--pdf/instance.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf/instance.cc b/pdf/instance.cc
index d779089..9cb7829 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -307,6 +307,10 @@ Instance::Instance(PP_Instance instance)
}
Instance::~Instance() {
+ if (timer_pending_) {
+ timer_factory_.CancelAll();
+ timer_pending_ = false;
+ }
// The engine may try to access this instance during its destruction.
// Make sure this happens early while the instance is still intact.
engine_.reset();