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

Unified Diff: third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h

Issue 2729613007: Fixing a crash in MediaCustomControlsFullscreenDetector when the page is destroyed (Closed)
Patch Set: rebased Created 3 years, 9 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
Index: third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h
diff --git a/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h b/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h
index bf976182e8cbc5be37a8bcac1101f2c49640f576..4d0f2154e7eaba969c94c05f9ac69ed1750d6ff6 100644
--- a/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h
+++ b/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.h
@@ -6,6 +6,7 @@
#define MediaCustomControlsFullscreenDetector_h
#include "core/CoreExport.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "core/events/EventListener.h"
#include "platform/Timer.h"
@@ -16,7 +17,9 @@ class IntRect;
class TimerBase;
class CORE_EXPORT MediaCustomControlsFullscreenDetector final
- : public EventListener {
+ : public EventListener,
+ public ContextLifecycleObserver {
+ USING_GARBAGE_COLLECTED_MIXIN(MediaCustomControlsFullscreenDetector);
WTF_MAKE_NONCOPYABLE(MediaCustomControlsFullscreenDetector);
public:
@@ -25,10 +28,14 @@ class CORE_EXPORT MediaCustomControlsFullscreenDetector final
// EventListener implementation.
bool operator==(const EventListener&) const override;
+ // ContextLifecycleObserver implemnetation.
+ void contextDestroyed(ExecutionContext*);
+
DECLARE_VIRTUAL_TRACE();
private:
friend class MediaCustomControlsFullscreenDetectorTest;
+ friend class HTMLMediaElementEventListenersTest;
// EventListener implementation.
void handleEvent(ExecutionContext*, Event*) override;

Powered by Google App Engine
This is Rietveld 408576698