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

Side by Side Diff: Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

Issue 11363215: Merge 134093 - MediaStream API: Don't trigger any object deletion during RTCPeerConnection::stop (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 return eventNames().interfaceForRTCPeerConnection; 516 return eventNames().interfaceForRTCPeerConnection;
517 } 517 }
518 518
519 ScriptExecutionContext* RTCPeerConnection::scriptExecutionContext() const 519 ScriptExecutionContext* RTCPeerConnection::scriptExecutionContext() const
520 { 520 {
521 return ActiveDOMObject::scriptExecutionContext(); 521 return ActiveDOMObject::scriptExecutionContext();
522 } 522 }
523 523
524 void RTCPeerConnection::stop() 524 void RTCPeerConnection::stop()
525 { 525 {
526 if (m_readyState != ReadyStateClosed)
527 m_peerHandler->stop();
528
529 m_peerHandler.clear();
530
531 m_iceState = IceStateClosed; 526 m_iceState = IceStateClosed;
532 m_readyState = ReadyStateClosed; 527 m_readyState = ReadyStateClosed;
533 528
534 Vector<RefPtr<RTCDataChannel> >::iterator i = m_dataChannels.begin(); 529 Vector<RefPtr<RTCDataChannel> >::iterator i = m_dataChannels.begin();
535 for (; i != m_dataChannels.end(); ++i) 530 for (; i != m_dataChannels.end(); ++i)
536 (*i)->stop(); 531 (*i)->stop();
537 } 532 }
538 533
539 EventTargetData* RTCPeerConnection::eventTargetData() 534 EventTargetData* RTCPeerConnection::eventTargetData()
540 { 535 {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 Vector<RefPtr<Event> >::iterator it = events.begin(); 590 Vector<RefPtr<Event> >::iterator it = events.begin();
596 for (; it != events.end(); ++it) 591 for (; it != events.end(); ++it)
597 dispatchEvent((*it).release()); 592 dispatchEvent((*it).release());
598 593
599 events.clear(); 594 events.clear();
600 } 595 }
601 596
602 } // namespace WebCore 597 } // namespace WebCore
603 598
604 #endif // ENABLE(MEDIA_STREAM) 599 #endif // ENABLE(MEDIA_STREAM)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698