Index: content/browser/media/capture/aura_window_capture_machine.cc |
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc |
index a56208f38aa1fac4fada467d6c43e788d2f207c0..26e33cf70492cf922c8bc76fe2bafd11761f5ddc 100644 |
--- a/content/browser/media/capture/aura_window_capture_machine.cc |
+++ b/content/browser/media/capture/aura_window_capture_machine.cc |
@@ -124,8 +124,13 @@ void AuraWindowCaptureMachine::InternalStop(const base::Closure& callback) { |
} |
void AuraWindowCaptureMachine::MaybeCaptureForRefresh() { |
- DCHECK_CURRENTLY_ON(BrowserThread::UI); |
- Capture(false); |
+ BrowserThread::PostTask( |
+ BrowserThread::UI, FROM_HERE, |
+ base::Bind(&AuraWindowCaptureMachine::Capture, |
+ // Use of Unretained() is safe here since this task must run |
+ // before InternalStop(). |
+ base::Unretained(this), |
mcasas
2016/04/07 19:12:57
Actually, since |this| pointer would be used
on UI
miu
2016/04/07 19:55:31
tl;dr: It doesn't really matter, but the raw point
|
+ false)); |
} |
void AuraWindowCaptureMachine::SetWindow(aura::Window* window) { |