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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2277083002: Fix a crash in AVDA when dereferencing a null task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: media/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 44b4471cc69c69eccda3b13ef2553f56e51a12ed..fcc40220d0614ba6bfa9abe098c8e49196f02977 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -259,7 +259,7 @@ class AVDAManager {
// guaranteed to not run StopThreadTask() when the thread is hung because if
// an AVDA queues tasks after DoNothing(), the StopThreadTask() reply will
// be canceled by invalidating its weak pointer.
- if (thread_avda_instances_.empty() &&
+ if (thread_avda_instances_.empty() && construction_thread_.IsRunning() &&
!hang_detector_.IsThreadLikelyHung()) {
construction_thread_.task_runner()->PostTaskAndReply(
FROM_HERE, base::Bind(&base::DoNothing),
« 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