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

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

Issue 2007983006: Rename OwnPtr::clear() to reset() in modules/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 MediaKeySession::~MediaKeySession() 368 MediaKeySession::~MediaKeySession()
369 { 369 {
370 DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __FUNCTION__ << "(" << this << ")"; 370 DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __FUNCTION__ << "(" << this << ")";
371 } 371 }
372 372
373 void MediaKeySession::dispose() 373 void MediaKeySession::dispose()
374 { 374 {
375 // Promptly clears a raw reference from content/ to an on-heap object 375 // Promptly clears a raw reference from content/ to an on-heap object
376 // so that content/ doesn't access it in a lazy sweeping phase. 376 // so that content/ doesn't access it in a lazy sweeping phase.
377 m_session.clear(); 377 m_session.reset();
378 } 378 }
379 379
380 String MediaKeySession::sessionId() const 380 String MediaKeySession::sessionId() const
381 { 381 {
382 return m_session->sessionId(); 382 return m_session->sessionId();
383 } 383 }
384 384
385 ScriptPromise MediaKeySession::closed(ScriptState* scriptState) 385 ScriptPromise MediaKeySession::closed(ScriptState* scriptState)
386 { 386 {
387 return m_closedPromise->promise(scriptState->world()); 387 return m_closedPromise->promise(scriptState->world());
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); 905 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : "");
906 906
907 return !m_pendingActions.isEmpty() 907 return !m_pendingActions.isEmpty()
908 || m_asyncEventQueue->hasPendingEvents() 908 || m_asyncEventQueue->hasPendingEvents()
909 || (m_mediaKeys && !m_isClosed); 909 || (m_mediaKeys && !m_isClosed);
910 } 910 }
911 911
912 void MediaKeySession::stop() 912 void MediaKeySession::stop()
913 { 913 {
914 // Stop the CDM from firing any more events for this session. 914 // Stop the CDM from firing any more events for this session.
915 m_session.clear(); 915 m_session.reset();
916 m_isClosed = true; 916 m_isClosed = true;
917 917
918 if (m_actionTimer.isActive()) 918 if (m_actionTimer.isActive())
919 m_actionTimer.stop(); 919 m_actionTimer.stop();
920 m_pendingActions.clear(); 920 m_pendingActions.clear();
921 m_asyncEventQueue->close(); 921 m_asyncEventQueue->close();
922 } 922 }
923 923
924 DEFINE_TRACE(MediaKeySession) 924 DEFINE_TRACE(MediaKeySession)
925 { 925 {
926 visitor->trace(m_asyncEventQueue); 926 visitor->trace(m_asyncEventQueue);
927 visitor->trace(m_pendingActions); 927 visitor->trace(m_pendingActions);
928 visitor->trace(m_mediaKeys); 928 visitor->trace(m_mediaKeys);
929 visitor->trace(m_keyStatusesMap); 929 visitor->trace(m_keyStatusesMap);
930 visitor->trace(m_closedPromise); 930 visitor->trace(m_closedPromise);
931 EventTargetWithInlineData::trace(visitor); 931 EventTargetWithInlineData::trace(visitor);
932 ActiveDOMObject::trace(visitor); 932 ActiveDOMObject::trace(visitor);
933 } 933 }
934 934
935 } // namespace blink 935 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698