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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp

Issue 2863713002: [Media, Controls] Cleanup resize observer before dereferencing. (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
index 4a56a9f928556ceca271144191ea5bbdda43b259..7bc6352bbc12a346c8795bbd5dd7cc055a514be4 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
@@ -508,7 +508,10 @@ void MediaControlsImpl::RemovedFrom(ContainerNode*) {
if (rotate_to_fullscreen_delegate_)
rotate_to_fullscreen_delegate_->Detach();
- resize_observer_.Clear();
+ if (resize_observer_) {
+ resize_observer_->disconnect();
+ resize_observer_.Clear();
+ }
if (element_mutation_callback_) {
element_mutation_callback_->Disconnect();
« 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