diff options
author | miu <miu@chromium.org> | 2015-09-03 15:20:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-03 22:21:21 +0000 |
commit | 14d3aff86097e05ccf6319114f1711b2129762e9 (patch) | |
tree | a0ec8dc80344fc91dada5cef5d603f6ec2007170 /content/browser | |
parent | 047aa237f24ae3484c98cd520560898320cfbb08 (diff) | |
download | chromium_src-14d3aff86097e05ccf6319114f1711b2129762e9.zip chromium_src-14d3aff86097e05ccf6319114f1711b2129762e9.tar.gz chromium_src-14d3aff86097e05ccf6319114f1711b2129762e9.tar.bz2 |
Crash fix for window closed during Aura window capture.
The root cause was that while the code *did* have a WindowObserver to
stop capture when the window was destroyed, it erroneously did so by
posting a task that would be executed too late. This change makes the
stop operation synchronous.
BUG=513103
Review URL: https://codereview.chromium.org/1327673006
Cr-Commit-Position: refs/heads/master@{#347266}
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/media/capture/aura_window_capture_machine.cc | 6 | ||||
-rw-r--r-- | content/browser/media/capture/aura_window_capture_machine.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc index 1da5506..f4db960 100644 --- a/content/browser/media/capture/aura_window_capture_machine.cc +++ b/content/browser/media/capture/aura_window_capture_machine.cc @@ -456,12 +456,12 @@ void AuraWindowCaptureMachine::OnWindowBoundsChanged( &AuraWindowCaptureMachine::UpdateCaptureSize, AsWeakPtr())); } -void AuraWindowCaptureMachine::OnWindowDestroyed(aura::Window* window) { +void AuraWindowCaptureMachine::OnWindowDestroying(aura::Window* window) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - Stop(base::Bind(&base::DoNothing)); + InternalStop(base::Bind(&base::DoNothing)); - oracle_proxy_->ReportError("OnWindowDestroyed()"); + oracle_proxy_->ReportError("OnWindowDestroying()"); } void AuraWindowCaptureMachine::OnWindowAddedToRootWindow( diff --git a/content/browser/media/capture/aura_window_capture_machine.h b/content/browser/media/capture/aura_window_capture_machine.h index 0b8d15c..91e0603 100644 --- a/content/browser/media/capture/aura_window_capture_machine.h +++ b/content/browser/media/capture/aura_window_capture_machine.h @@ -44,7 +44,7 @@ class AuraWindowCaptureMachine void OnWindowBoundsChanged(aura::Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) override; - void OnWindowDestroyed(aura::Window* window) override; + void OnWindowDestroying(aura::Window* window) override; void OnWindowAddedToRootWindow(aura::Window* window) override; void OnWindowRemovingFromRootWindow(aura::Window* window, aura::Window* new_root) override; |