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

Side by Side Diff: Source/modules/encryptedmedia/MediaKeySession.h

Issue 1159583002: Eagerly sweep MediaKeySession objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: improve comment Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ScriptPromise remove(ScriptState*); 82 ScriptPromise remove(ScriptState*);
83 83
84 // EventTarget 84 // EventTarget
85 virtual const AtomicString& interfaceName() const override; 85 virtual const AtomicString& interfaceName() const override;
86 virtual ExecutionContext* executionContext() const override; 86 virtual ExecutionContext* executionContext() const override;
87 87
88 // ActiveDOMObject 88 // ActiveDOMObject
89 virtual bool hasPendingActivity() const override; 89 virtual bool hasPendingActivity() const override;
90 virtual void stop() override; 90 virtual void stop() override;
91 91
92 // Oilpan: eagerly release owned m_session, which in turn
93 // drops the client reference back to this MediaKeySession object.
94 EAGERLY_FINALIZE();
92 DECLARE_VIRTUAL_TRACE(); 95 DECLARE_VIRTUAL_TRACE();
93 96
94 private: 97 private:
95 class PendingAction; 98 class PendingAction;
96 friend class NewSessionResultPromise; 99 friend class NewSessionResultPromise;
97 friend class LoadSessionResultPromise; 100 friend class LoadSessionResultPromise;
98 101
99 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType); 102 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType);
100 103
101 void actionTimerFired(Timer<MediaKeySession>*); 104 void actionTimerFired(Timer<MediaKeySession>*);
(...skipping 30 matching lines...) Expand all
132 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato r, Member<DOMException>> ClosedPromise; 135 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato r, Member<DOMException>> ClosedPromise;
133 Member<ClosedPromise> m_closedPromise; 136 Member<ClosedPromise> m_closedPromise;
134 137
135 HeapDeque<Member<PendingAction>> m_pendingActions; 138 HeapDeque<Member<PendingAction>> m_pendingActions;
136 Timer<MediaKeySession> m_actionTimer; 139 Timer<MediaKeySession> m_actionTimer;
137 }; 140 };
138 141
139 } // namespace blink 142 } // namespace blink
140 143
141 #endif // MediaKeySession_h 144 #endif // MediaKeySession_h
OLDNEW
« no previous file with comments | « Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h ('k') | Source/modules/encryptedmedia/MediaKeysClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698