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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 * 7 *
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 396
397 RTCPeerConnection* peerConnection = new RTCPeerConnection(context, configura tion, constraints, exceptionState); 397 RTCPeerConnection* peerConnection = new RTCPeerConnection(context, configura tion, constraints, exceptionState);
398 peerConnection->suspendIfNeeded(); 398 peerConnection->suspendIfNeeded();
399 if (exceptionState.hadException()) 399 if (exceptionState.hadException())
400 return 0; 400 return 0;
401 401
402 return peerConnection; 402 return peerConnection;
403 } 403 }
404 404
405 RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, RTCConfiguration * configuration, WebMediaConstraints constraints, ExceptionState& exceptionState ) 405 RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, RTCConfiguration * configuration, WebMediaConstraints constraints, ExceptionState& exceptionState )
406 : ActiveDOMObject(context) 406 : ActiveScriptWrappable(this)
407 , ActiveDOMObject(context)
407 , m_signalingState(SignalingStateStable) 408 , m_signalingState(SignalingStateStable)
408 , m_iceGatheringState(ICEGatheringStateNew) 409 , m_iceGatheringState(ICEGatheringStateNew)
409 , m_iceConnectionState(ICEConnectionStateNew) 410 , m_iceConnectionState(ICEConnectionStateNew)
410 , m_dispatchScheduledEventRunner(AsyncMethodRunner<RTCPeerConnection>::creat e(this, &RTCPeerConnection::dispatchScheduledEvent)) 411 , m_dispatchScheduledEventRunner(AsyncMethodRunner<RTCPeerConnection>::creat e(this, &RTCPeerConnection::dispatchScheduledEvent))
411 , m_stopped(false) 412 , m_stopped(false)
412 , m_closed(false) 413 , m_closed(false)
413 { 414 {
414 Document* document = toDocument(getExecutionContext()); 415 Document* document = toDocument(getExecutionContext());
415 416
416 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the assert in the destructor. 417 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the assert in the destructor.
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 { 1166 {
1166 visitor->trace(m_localStreams); 1167 visitor->trace(m_localStreams);
1167 visitor->trace(m_remoteStreams); 1168 visitor->trace(m_remoteStreams);
1168 visitor->trace(m_dispatchScheduledEventRunner); 1169 visitor->trace(m_dispatchScheduledEventRunner);
1169 visitor->trace(m_scheduledEvents); 1170 visitor->trace(m_scheduledEvents);
1170 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor); 1171 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor);
1171 ActiveDOMObject::trace(visitor); 1172 ActiveDOMObject::trace(visitor);
1172 } 1173 }
1173 1174
1174 } // namespace blink 1175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698