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

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

Issue 2577053002: ActiveScriptWrappable: GC wrappers in detached ExecutionContexts. (Closed)
Patch Set: component build fix(msvc) Created 4 years 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 MediaStreamTrack* MediaStreamTrack::create(ExecutionContext* context, 54 MediaStreamTrack* MediaStreamTrack::create(ExecutionContext* context,
55 MediaStreamComponent* component) { 55 MediaStreamComponent* component) {
56 MediaStreamTrack* track = new MediaStreamTrack(context, component); 56 MediaStreamTrack* track = new MediaStreamTrack(context, component);
57 track->suspendIfNeeded(); 57 track->suspendIfNeeded();
58 return track; 58 return track;
59 } 59 }
60 60
61 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context, 61 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context,
62 MediaStreamComponent* component) 62 MediaStreamComponent* component)
63 : ActiveScriptWrappable(this), 63 : ActiveScriptWrappable<MediaStreamTrack>(this),
64 SuspendableObject(context), 64 SuspendableObject(context),
65 m_readyState(MediaStreamSource::ReadyStateLive), 65 m_readyState(MediaStreamSource::ReadyStateLive),
66 m_isIteratingRegisteredMediaStreams(false), 66 m_isIteratingRegisteredMediaStreams(false),
67 m_stopped(false), 67 m_stopped(false),
68 m_component(component), 68 m_component(component),
69 // The source's constraints aren't yet initialized at creation time. 69 // The source's constraints aren't yet initialized at creation time.
70 m_constraints() { 70 m_constraints() {
71 m_component->source()->addObserver(this); 71 m_component->source()->addObserver(this);
72 } 72 }
73 73
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 DEFINE_TRACE(MediaStreamTrack) { 319 DEFINE_TRACE(MediaStreamTrack) {
320 visitor->trace(m_registeredMediaStreams); 320 visitor->trace(m_registeredMediaStreams);
321 visitor->trace(m_component); 321 visitor->trace(m_component);
322 EventTargetWithInlineData::trace(visitor); 322 EventTargetWithInlineData::trace(visitor);
323 SuspendableObject::trace(visitor); 323 SuspendableObject::trace(visitor);
324 } 324 }
325 325
326 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698