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

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

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return; 118 return;
119 } 119 }
120 120
121 // 2. If the session is not in the PENDING state, throw an INVALID_STATE_ERR . 121 // 2. If the session is not in the PENDING state, throw an INVALID_STATE_ERR .
122 // FIXME: Implement states in MediaKeySession. 122 // FIXME: Implement states in MediaKeySession.
123 123
124 // 3. Schedule a task to handle the call, providing response. 124 // 3. Schedule a task to handle the call, providing response.
125 m_pendingActions.append(PendingAction::CreatePendingUpdate(response)); 125 m_pendingActions.append(PendingAction::CreatePendingUpdate(response));
126 126
127 if (!m_actionTimer.isActive()) 127 if (!m_actionTimer.isActive())
128 m_actionTimer.startOneShot(0); 128 m_actionTimer.startOneShot(0, FROM_HERE);
129 } 129 }
130 130
131 void MediaKeySession::release(ExceptionState& exceptionState) 131 void MediaKeySession::release(ExceptionState& exceptionState)
132 { 132 {
133 WTF_LOG(Media, "MediaKeySession::release"); 133 WTF_LOG(Media, "MediaKeySession::release");
134 ASSERT(!m_isClosed); 134 ASSERT(!m_isClosed);
135 135
136 // From <https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/ encrypted-media.html#dom-release>: 136 // From <https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/ encrypted-media.html#dom-release>:
137 // The release() method must run the following steps: 137 // The release() method must run the following steps:
138 // 1. If the state of the MediaKeySession is CLOSED then abort these steps. 138 // 1. If the state of the MediaKeySession is CLOSED then abort these steps.
139 // 2. If the state of the MediaKeySession is ERROR, throw an INVALID_STATE_E RR 139 // 2. If the state of the MediaKeySession is ERROR, throw an INVALID_STATE_E RR
140 // exception and abort these steps. 140 // exception and abort these steps.
141 // FIXME: Implement states in MediaKeySession. 141 // FIXME: Implement states in MediaKeySession.
142 142
143 // 3. Schedule a task to handle the call. 143 // 3. Schedule a task to handle the call.
144 m_pendingActions.append(PendingAction::CreatePendingRelease()); 144 m_pendingActions.append(PendingAction::CreatePendingRelease());
145 145
146 if (!m_actionTimer.isActive()) 146 if (!m_actionTimer.isActive())
147 m_actionTimer.startOneShot(0); 147 m_actionTimer.startOneShot(0, FROM_HERE);
148 } 148 }
149 149
150 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*) 150 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*)
151 { 151 {
152 ASSERT(m_pendingActions.size()); 152 ASSERT(m_pendingActions.size());
153 153
154 while (!m_pendingActions.isEmpty()) { 154 while (!m_pendingActions.isEmpty()) {
155 OwnPtr<PendingAction> pendingAction(m_pendingActions.takeFirst()); 155 OwnPtr<PendingAction> pendingAction(m_pendingActions.takeFirst());
156 156
157 switch (pendingAction->type) { 157 switch (pendingAction->type) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 m_session.clear(); 265 m_session.clear();
266 m_isClosed = true; 266 m_isClosed = true;
267 267
268 if (m_actionTimer.isActive()) 268 if (m_actionTimer.isActive())
269 m_actionTimer.stop(); 269 m_actionTimer.stop();
270 m_pendingActions.clear(); 270 m_pendingActions.clear();
271 m_asyncEventQueue->close(); 271 m_asyncEventQueue->close();
272 } 272 }
273 273
274 } 274 }
OLDNEW
« no previous file with comments | « Source/modules/device_orientation/DeviceSensorEventController.cpp ('k') | Source/modules/encryptedmedia/MediaKeys.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698