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

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: Updated to use EAGER_FINALIZE() 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.
haraken 2015/06/04 00:49:12 It would be nice to elaborate on this a bit more.
sof 2015/06/04 06:07:22 Expanded the comment.
93 EAGERLY_FINALIZE();
92 DECLARE_VIRTUAL_TRACE(); 94 DECLARE_VIRTUAL_TRACE();
93 95
94 private: 96 private:
95 class PendingAction; 97 class PendingAction;
96 friend class NewSessionResultPromise; 98 friend class NewSessionResultPromise;
97 friend class LoadSessionResultPromise; 99 friend class LoadSessionResultPromise;
98 100
99 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType); 101 MediaKeySession(ScriptState*, MediaKeys*, WebEncryptedMediaSessionType);
100 102
101 void actionTimerFired(Timer<MediaKeySession>*); 103 void actionTimerFired(Timer<MediaKeySession>*);
(...skipping 30 matching lines...) Expand all
132 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato r, Member<DOMException>> ClosedPromise; 134 typedef ScriptPromiseProperty<Member<MediaKeySession>, ToV8UndefinedGenerato r, Member<DOMException>> ClosedPromise;
133 Member<ClosedPromise> m_closedPromise; 135 Member<ClosedPromise> m_closedPromise;
134 136
135 HeapDeque<Member<PendingAction>> m_pendingActions; 137 HeapDeque<Member<PendingAction>> m_pendingActions;
136 Timer<MediaKeySession> m_actionTimer; 138 Timer<MediaKeySession> m_actionTimer;
137 }; 139 };
138 140
139 } // namespace blink 141 } // namespace blink
140 142
141 #endif // MediaKeySession_h 143 #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