OLD | NEW |
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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 return promise; | 611 return promise; |
612 } | 612 } |
613 | 613 |
614 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*) | 614 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*) |
615 { | 615 { |
616 ASSERT(m_pendingActions.size()); | 616 ASSERT(m_pendingActions.size()); |
617 | 617 |
618 // Resolving promises now run synchronously and may result in additional | 618 // Resolving promises now run synchronously and may result in additional |
619 // actions getting added to the queue. As a result, swap the queue to | 619 // actions getting added to the queue. As a result, swap the queue to |
620 // a local copy to avoid problems if this happens. | 620 // a local copy to avoid problems if this happens. |
621 HeapDeque<Member<PendingAction> > pendingActions; | 621 HeapDeque<Member<PendingAction>> pendingActions; |
622 pendingActions.swap(m_pendingActions); | 622 pendingActions.swap(m_pendingActions); |
623 | 623 |
624 while (!pendingActions.isEmpty()) { | 624 while (!pendingActions.isEmpty()) { |
625 PendingAction* action = pendingActions.takeFirst(); | 625 PendingAction* action = pendingActions.takeFirst(); |
626 | 626 |
627 switch (action->type()) { | 627 switch (action->type()) { |
628 case PendingAction::GenerateRequest: | 628 case PendingAction::GenerateRequest: |
629 WTF_LOG(Media, "MediaKeySession(%p)::actionTimerFired: GenerateReque
st", this); | 629 WTF_LOG(Media, "MediaKeySession(%p)::actionTimerFired: GenerateReque
st", this); |
630 | 630 |
631 // 10.1 Let request be null. | 631 // 10.1 Let request be null. |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 { | 897 { |
898 visitor->trace(m_asyncEventQueue); | 898 visitor->trace(m_asyncEventQueue); |
899 visitor->trace(m_pendingActions); | 899 visitor->trace(m_pendingActions); |
900 visitor->trace(m_mediaKeys); | 900 visitor->trace(m_mediaKeys); |
901 visitor->trace(m_closedPromise); | 901 visitor->trace(m_closedPromise); |
902 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace(
visitor); | 902 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace(
visitor); |
903 ActiveDOMObject::trace(visitor); | 903 ActiveDOMObject::trace(visitor); |
904 } | 904 } |
905 | 905 |
906 } // namespace blink | 906 } // namespace blink |
OLD | NEW |