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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void MediaStreamTrack::propagateTrackEnded() { 259 void MediaStreamTrack::propagateTrackEnded() {
260 CHECK(!m_isIteratingRegisteredMediaStreams); 260 CHECK(!m_isIteratingRegisteredMediaStreams);
261 m_isIteratingRegisteredMediaStreams = true; 261 m_isIteratingRegisteredMediaStreams = true;
262 for (HeapHashSet<Member<MediaStream>>::iterator iter = 262 for (HeapHashSet<Member<MediaStream>>::iterator iter =
263 m_registeredMediaStreams.begin(); 263 m_registeredMediaStreams.begin();
264 iter != m_registeredMediaStreams.end(); ++iter) 264 iter != m_registeredMediaStreams.end(); ++iter)
265 (*iter)->trackEnded(); 265 (*iter)->trackEnded();
266 m_isIteratingRegisteredMediaStreams = false; 266 m_isIteratingRegisteredMediaStreams = false;
267 } 267 }
268 268
269 void MediaStreamTrack::contextDestroyed() { 269 void MediaStreamTrack::contextDestroyed(ExecutionContext*) {
270 m_stopped = true; 270 m_stopped = true;
271 } 271 }
272 272
273 bool MediaStreamTrack::hasPendingActivity() const { 273 bool MediaStreamTrack::hasPendingActivity() const {
274 // If 'ended' listeners exist and the object hasn't yet reached 274 // If 'ended' listeners exist and the object hasn't yet reached
275 // that state, keep the object alive. 275 // that state, keep the object alive.
276 // 276 //
277 // An otherwise unreachable MediaStreamTrack object in an non-ended 277 // An otherwise unreachable MediaStreamTrack object in an non-ended
278 // state will otherwise indirectly be transitioned to the 'ended' state 278 // state will otherwise indirectly be transitioned to the 'ended' state
279 // while finalizing m_component. Which dispatches an 'ended' event, 279 // while finalizing m_component. Which dispatches an 'ended' event,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 DEFINE_TRACE(MediaStreamTrack) { 316 DEFINE_TRACE(MediaStreamTrack) {
317 visitor->trace(m_registeredMediaStreams); 317 visitor->trace(m_registeredMediaStreams);
318 visitor->trace(m_component); 318 visitor->trace(m_component);
319 EventTargetWithInlineData::trace(visitor); 319 EventTargetWithInlineData::trace(visitor);
320 ContextLifecycleObserver::trace(visitor); 320 ContextLifecycleObserver::trace(visitor);
321 } 321 }
322 322
323 } // namespace blink 323 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698