diff options
author | dnicoara <dnicoara@chromium.org> | 2015-03-16 10:05:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-16 17:05:41 +0000 |
commit | 8c08f77eae4c223b72d0a404b9139b179ec53e24 (patch) | |
tree | 401d62c8bc423d32d8b1ba071635561a275af91a /ui/ozone/platform/drm/gpu/drm_device.cc | |
parent | fee69b4b384e94f03cd7d4dadf3140dd91bb9029 (diff) | |
download | chromium_src-8c08f77eae4c223b72d0a404b9139b179ec53e24.zip chromium_src-8c08f77eae4c223b72d0a404b9139b179ec53e24.tar.gz chromium_src-8c08f77eae4c223b72d0a404b9139b179ec53e24.tar.bz2 |
[Ozone-Drm] Do not try to take ref_ptr from destructor
Can't post a task with a ref-counted instance of the watcher from the
destructor.
BUG=467170
Review URL: https://codereview.chromium.org/1006403002
Cr-Commit-Position: refs/heads/master@{#320739}
Diffstat (limited to 'ui/ozone/platform/drm/gpu/drm_device.cc')
-rw-r--r-- | ui/ozone/platform/drm/gpu/drm_device.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc index 5f87095..03ca9aa 100644 --- a/ui/ozone/platform/drm/gpu/drm_device.cc +++ b/ui/ozone/platform/drm/gpu/drm_device.cc @@ -114,6 +114,7 @@ class DrmDevice::IOWatcher base::WaitableEvent done(false, false); io_task_runner_->PostTask( FROM_HERE, base::Bind(&IOWatcher::SetPausedOnIO, this, &done)); + done.Wait(); } void Shutdown() { @@ -125,7 +126,7 @@ class DrmDevice::IOWatcher private: friend class base::RefCountedThreadSafe<IOWatcher>; - ~IOWatcher() override { SetPaused(true); } + ~IOWatcher() override {} void RegisterOnIO() { DCHECK(base::MessageLoopForIO::IsCurrent()); |