<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185316] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185316">185316</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-06-08 07:36:47 -0700 (Mon, 08 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use modern for-loops in WebCore/Modules - 2
https://bugs.webkit.org/show_bug.cgi?id=145541
Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-06-08
Reviewed by Darin Adler.
No new tests, no behavior changes.
* Modules/mediastream/RTCConfiguration.h:
(WebCore::RTCConfiguration::iceServers):
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::processIceServer):
(WebCore::RTCPeerConnection::~RTCPeerConnection):
(WebCore::RTCPeerConnection::getStreamById):
(WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
(WebCore::RTCPeerConnection::stop):
(WebCore::RTCPeerConnection::scheduledEventTimerFired):
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::names):
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::getVoices):
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::memoryCost):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
(WebCore::AudioContext::derefFinishedSourceNodes):
(WebCore::AudioContext::derefUnfinishedSourceNodes):
(WebCore::AudioContext::handleDeferredFinishDerefs):
(WebCore::AudioContext::handleDirtyAudioSummingJunctions):
(WebCore::AudioContext::handleDirtyAudioNodeOutputs):
(WebCore::AudioContext::updateAutomaticPullNodes):
(WebCore::AudioContext::processAutomaticPullNodes):
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::updateChannelsForInputs):
(WebCore::AudioNode::checkNumberOfChannelsForInput):
(WebCore::AudioNode::pullInputs):
(WebCore::AudioNode::inputsAreSilent):
(WebCore::AudioNode::silenceOutputs):
(WebCore::AudioNode::unsilenceOutputs):
(WebCore::AudioNode::enableOutputsIfNecessary):
(WebCore::AudioNode::disableOutputsIfNecessary):
(WebCore::AudioNode::finishDeref):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::numberOfChannels):
(WebCore::AudioNodeInput::sumAllConnections):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::propagateChannelCount):
(WebCore::AudioNodeOutput::disable):
(WebCore::AudioNodeOutput::enable):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::calculateFinalValues):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::insertEvent):
* Modules/webaudio/AudioSummingJunction.cpp:
(WebCore::AudioSummingJunction::updateRenderingState):
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::setAudioFormat):
(WebCore::MediaStreamAudioSource::consumeAudio):
* Modules/webaudio/WaveShaperProcessor.cpp:
(WebCore::WaveShaperProcessor::setOversample):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::handlePausedQueue):
(WebCore::DatabaseThread::databaseThread):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
(WebCore::DatabaseTracker::databaseNamesForOrigin):
(WebCore::DatabaseTracker::getOpenDatabases):
(WebCore::DatabaseTracker::usageForOrigin):
(WebCore::DatabaseTracker::deleteAllDatabases):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::deleteDatabaseFile):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
(WebCore::DatabaseTracker::setDatabasesPaused):
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
(WebCore::SQLTransactionCoordinator::shutdown):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::addProcessor):
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
(WebCore::WebSocketExtensionDispatcher::processHeaderValue):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeMessage):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCConfigurationh">trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp">trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDataChannelcpp">trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCStatsReportcpp">trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesnavigatorcontentutilsNavigatorContentUtilscpp">trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesiscpp">trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioBuffercpp">trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioContextcpp">trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioNodecpp">trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioNodeInputcpp">trunk/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioNodeOutputcpp">trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioParamcpp">trunk/Source/WebCore/Modules/webaudio/AudioParam.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioParamTimelinecpp">trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioSummingJunctioncpp">trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioMediaStreamAudioSourcecpp">trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioWaveShaperProcessorcpp">trunk/Source/WebCore/Modules/webaudio/WaveShaperProcessor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseThreadcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseTrackercpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseSQLTransactionCoordinatorcpp">trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebsocketsWebSocketcpp">trunk/Source/WebCore/Modules/websockets/WebSocket.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebsocketsWebSocketExtensionDispatchercpp">trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebsocketsWebSocketHandshakecpp">trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/ChangeLog        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -1,3 +1,94 @@
</span><ins>+2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
+
+ Use modern for-loops in WebCore/Modules - 2
+ https://bugs.webkit.org/show_bug.cgi?id=145541
+
+ Reviewed by Darin Adler.
+
+ No new tests, no behavior changes.
+
+ * Modules/mediastream/RTCConfiguration.h:
+ (WebCore::RTCConfiguration::iceServers):
+ * Modules/mediastream/RTCDTMFSender.cpp:
+ (WebCore::RTCDTMFSender::scheduledEventTimerFired):
+ * Modules/mediastream/RTCDataChannel.cpp:
+ (WebCore::RTCDataChannel::scheduledEventTimerFired):
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::processIceServer):
+ (WebCore::RTCPeerConnection::~RTCPeerConnection):
+ (WebCore::RTCPeerConnection::getStreamById):
+ (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
+ (WebCore::RTCPeerConnection::stop):
+ (WebCore::RTCPeerConnection::scheduledEventTimerFired):
+ * Modules/mediastream/RTCStatsReport.cpp:
+ (WebCore::RTCStatsReport::names):
+ * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
+ (WebCore::initProtocolHandlerWhitelist):
+ * Modules/speech/SpeechSynthesis.cpp:
+ (WebCore::SpeechSynthesis::getVoices):
+ * Modules/webaudio/AudioBuffer.cpp:
+ (WebCore::AudioBuffer::memoryCost):
+ * Modules/webaudio/AudioContext.cpp:
+ (WebCore::AudioContext::createMediaStreamSource):
+ (WebCore::AudioContext::derefFinishedSourceNodes):
+ (WebCore::AudioContext::derefUnfinishedSourceNodes):
+ (WebCore::AudioContext::handleDeferredFinishDerefs):
+ (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
+ (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
+ (WebCore::AudioContext::updateAutomaticPullNodes):
+ (WebCore::AudioContext::processAutomaticPullNodes):
+ * Modules/webaudio/AudioNode.cpp:
+ (WebCore::AudioNode::updateChannelsForInputs):
+ (WebCore::AudioNode::checkNumberOfChannelsForInput):
+ (WebCore::AudioNode::pullInputs):
+ (WebCore::AudioNode::inputsAreSilent):
+ (WebCore::AudioNode::silenceOutputs):
+ (WebCore::AudioNode::unsilenceOutputs):
+ (WebCore::AudioNode::enableOutputsIfNecessary):
+ (WebCore::AudioNode::disableOutputsIfNecessary):
+ (WebCore::AudioNode::finishDeref):
+ * Modules/webaudio/AudioNodeInput.cpp:
+ (WebCore::AudioNodeInput::numberOfChannels):
+ (WebCore::AudioNodeInput::sumAllConnections):
+ * Modules/webaudio/AudioNodeOutput.cpp:
+ (WebCore::AudioNodeOutput::propagateChannelCount):
+ (WebCore::AudioNodeOutput::disable):
+ (WebCore::AudioNodeOutput::enable):
+ * Modules/webaudio/AudioParam.cpp:
+ (WebCore::AudioParam::calculateFinalValues):
+ * Modules/webaudio/AudioParamTimeline.cpp:
+ (WebCore::AudioParamTimeline::insertEvent):
+ * Modules/webaudio/AudioSummingJunction.cpp:
+ (WebCore::AudioSummingJunction::updateRenderingState):
+ * Modules/webaudio/MediaStreamAudioSource.cpp:
+ (WebCore::MediaStreamAudioSource::setAudioFormat):
+ (WebCore::MediaStreamAudioSource::consumeAudio):
+ * Modules/webaudio/WaveShaperProcessor.cpp:
+ (WebCore::WaveShaperProcessor::setOversample):
+ * Modules/webdatabase/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::handlePausedQueue):
+ (WebCore::DatabaseThread::databaseThread):
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
+ (WebCore::DatabaseTracker::databaseNamesForOrigin):
+ (WebCore::DatabaseTracker::getOpenDatabases):
+ (WebCore::DatabaseTracker::usageForOrigin):
+ (WebCore::DatabaseTracker::deleteAllDatabases):
+ (WebCore::DatabaseTracker::deleteOrigin):
+ (WebCore::DatabaseTracker::deleteDatabaseFile):
+ (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
+ (WebCore::DatabaseTracker::setDatabasesPaused):
+ * Modules/webdatabase/SQLTransactionCoordinator.cpp:
+ (WebCore::SQLTransactionCoordinator::shutdown):
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::connect):
+ * Modules/websockets/WebSocketExtensionDispatcher.cpp:
+ (WebCore::WebSocketExtensionDispatcher::addProcessor):
+ (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
+ (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
+ * Modules/websockets/WebSocketHandshake.cpp:
+ (WebCore::WebSocketHandshake::clientHandshakeMessage):
+
</ins><span class="cx"> 2015-06-07 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
</span><span class="lines">@@ -69251,7 +69342,7 @@
</span><span class="cx"> with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
</span><span class="cx"> must either be on a separate object (more boilerplate), or the callback must be public for
</span><span class="cx"> HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
</span><del>- delegate objects it's hard to scale use of these objects - a single object can't serve as a
</del><ins>+ delegate objects it's hard to scale use of these objects - a single object can't serve as a
</ins><span class="cx"> delegate for multiple HysteresisActivity members.
</span><span class="cx">
</span><span class="cx"> Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/mediastream/RTCConfiguration.h        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -67,11 +67,9 @@
</span><span class="cx"> Vector<RefPtr<RTCIceServer>> iceServers() const
</span><span class="cx"> {
</span><span class="cx"> Vector<RefPtr<RTCIceServer>> servers;
</span><del>- Vector<RefPtr<RTCIceServerPrivate>> privateServers = m_private->iceServers();
</del><ins>+ for (auto& server : m_private->iceServers())
+ servers.append(RTCIceServer::create(server));
</ins><span class="cx">
</span><del>- for (auto iter = privateServers.begin(); iter != privateServers.end(); ++iter)
- servers.append(RTCIceServer::create(*iter));
-
</del><span class="cx"> return servers;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -161,9 +161,8 @@
</span><span class="cx"> Vector<RefPtr<Event>> events;
</span><span class="cx"> events.swap(m_scheduledEvents);
</span><span class="cx">
</span><del>- Vector<RefPtr<Event>>::iterator it = events.begin();
- for (; it != events.end(); ++it)
- dispatchEvent((*it).release());
</del><ins>+ for (auto& event : events)
+ dispatchEvent(event.release());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDataChannelcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -320,11 +320,8 @@
</span><span class="cx"> Vector<RefPtr<Event>> events;
</span><span class="cx"> events.swap(m_scheduledEvents);
</span><span class="cx">
</span><del>- Vector<RefPtr<Event>>::iterator it = events.begin();
- for (; it != events.end(); ++it)
- dispatchEvent((*it).release());
-
- events.clear();
</del><ins>+ for (auto& event : events)
+ dispatchEvent(event.release());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> return INVALID_ACCESS_ERR;
</span><span class="cx">
</span><span class="cx"> if (urlString.find(',') != notFound && iceServer.get("urls", urlsList) && urlsList.size()) {
</span><del>- for (auto iter = urlsList.begin(); iter != urlsList.end(); ++iter) {
- if (!validateIceServerURL(*iter))
</del><ins>+ for (auto& url : urlsList) {
+ if (!validateIceServerURL(url))
</ins><span class="cx"> return INVALID_ACCESS_ERR;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -203,8 +203,8 @@
</span><span class="cx"> {
</span><span class="cx"> stop();
</span><span class="cx">
</span><del>- for (auto stream = m_localStreams.begin(), end = m_localStreams.end(); stream != end; ++stream)
- (*stream)->removeObserver(this);
</del><ins>+ for (auto& localStream : m_localStreams)
+ localStream->removeObserver(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RTCPeerConnection::createOffer(PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, const Dictionary& offerOptions, ExceptionCode& ec)
</span><span class="lines">@@ -514,14 +514,14 @@
</span><span class="cx">
</span><span class="cx"> MediaStream* RTCPeerConnection::getStreamById(const String& streamId)
</span><span class="cx"> {
</span><del>- for (auto iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) {
- if ((*iter)->id() == streamId)
- return iter->get();
</del><ins>+ for (auto& localStream : m_localStreams) {
+ if (localStream->id() == streamId)
+ return localStream.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- for (auto iter = m_remoteStreams.begin(); iter != m_remoteStreams.end(); ++iter) {
- if ((*iter)->id() == streamId)
- return iter->get();
</del><ins>+ for (auto& remoteStream : m_remoteStreams) {
+ if (remoteStream->id() == streamId)
+ return remoteStream.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -551,8 +551,8 @@
</span><span class="cx">
</span><span class="cx"> bool RTCPeerConnection::hasLocalStreamWithTrackId(const String& trackId)
</span><span class="cx"> {
</span><del>- for (auto iter = m_localStreams.begin(); iter != m_localStreams.end(); ++iter) {
- if ((*iter)->getTrackById(trackId))
</del><ins>+ for (auto& localStream : m_localStreams) {
+ if (localStream->getTrackById(trackId))
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -685,9 +685,8 @@
</span><span class="cx"> m_iceConnectionState = IceConnectionStateClosed;
</span><span class="cx"> m_signalingState = SignalingStateClosed;
</span><span class="cx">
</span><del>- Vector<RefPtr<RTCDataChannel>>::iterator i = m_dataChannels.begin();
- for (; i != m_dataChannels.end(); ++i)
- (*i)->stop();
</del><ins>+ for (auto& channel : m_dataChannels)
+ channel->stop();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const char* RTCPeerConnection::activeDOMObjectName() const
</span><span class="lines">@@ -743,9 +742,8 @@
</span><span class="cx"> Vector<RefPtr<Event>> events;
</span><span class="cx"> events.swap(m_scheduledEvents);
</span><span class="cx">
</span><del>- Vector<RefPtr<Event>>::iterator it = events.begin();
- for (; it != events.end(); ++it)
- dispatchEvent((*it).release());
</del><ins>+ for (auto& event : events)
+ dispatchEvent(event.release());
</ins><span class="cx">
</span><span class="cx"> events.clear();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCStatsReportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -48,9 +48,8 @@
</span><span class="cx"> Vector<String> RTCStatsReport::names() const
</span><span class="cx"> {
</span><span class="cx"> Vector<String> result;
</span><del>- for (HashMap<String, String>::const_iterator it = m_stats.begin(); it != m_stats.end(); ++it) {
- result.append(it->key);
- }
</del><ins>+ for (auto& stat : m_stats.keys())
+ result.append(stat);
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnavigatorcontentutilsNavigatorContentUtilscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -44,29 +44,8 @@
</span><span class="cx"> static void initProtocolHandlerWhitelist()
</span><span class="cx"> {
</span><span class="cx"> protocolWhitelist = new HashSet<String>;
</span><del>- static const char* protocols[] = {
- "bitcoin",
- "geo",
- "im",
- "irc",
- "ircs",
- "magnet",
- "mailto",
- "mms",
- "news",
- "nntp",
- "sip",
- "sms",
- "smsto",
- "ssh",
- "tel",
- "urn",
- "webcal",
- "wtai",
- "xmpp",
- };
- for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
- protocolWhitelist->add(protocols[i]);
</del><ins>+ for (auto* protocol : { "bitcoin", "geo", "im", "irc", "ircs", "magnet", "mailto", "mms", "news", "nntp", "sip", "sms", "smsto", "ssh", "tel", "urn", "webcal", "wtai", "xmpp" })
+ protocolWhitelist->add(protocol);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool verifyCustomHandlerURL(const URL& baseURL, const String& url, ExceptionCode& ec)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesiscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -74,10 +74,8 @@
</span><span class="cx"> m_platformSpeechSynthesizer = std::make_unique<PlatformSpeechSynthesizer>(this);
</span><span class="cx">
</span><span class="cx"> // If the voiceList is empty, that's the cue to get the voices from the platform again.
</span><del>- const Vector<RefPtr<PlatformSpeechSynthesisVoice>>& platformVoices = m_platformSpeechSynthesizer->voiceList();
- size_t voiceCount = platformVoices.size();
- for (size_t k = 0; k < voiceCount; k++)
- m_voiceList.append(SpeechSynthesisVoice::create(platformVoices[k]));
</del><ins>+ for (auto& voice : m_platformSpeechSynthesizer->voiceList())
+ m_voiceList.append(SpeechSynthesisVoice::create(voice));
</ins><span class="cx">
</span><span class="cx"> return m_voiceList;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -125,8 +125,8 @@
</span><span class="cx"> size_t AudioBuffer::memoryCost() const
</span><span class="cx"> {
</span><span class="cx"> size_t cost = 0;
</span><del>- for (unsigned i = 0; i < m_channels.size() ; ++i)
- cost += m_channels[i]->byteLength();
</del><ins>+ for (auto& channel : m_channels)
+ cost += channel->byteLength();
</ins><span class="cx"> return cost;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -460,12 +460,11 @@
</span><span class="cx">
</span><span class="cx"> AudioSourceProvider* provider = 0;
</span><span class="cx">
</span><del>- Vector<RefPtr<MediaStreamTrack>> audioTracks = mediaStream->getAudioTracks();
</del><span class="cx"> RefPtr<MediaStreamTrack> audioTrack;
</span><span class="cx">
</span><span class="cx"> // FIXME: get a provider for non-local MediaStreams (like from a remote peer).
</span><del>- for (size_t i = 0; i < audioTracks.size(); ++i) {
- audioTrack = audioTracks[i];
</del><ins>+ for (auto& track : mediaStream->getAudioTracks()) {
+ audioTrack = track;
</ins><span class="cx"> if (audioTrack->source()->isAudioStreamSource()) {
</span><span class="cx"> auto source = static_cast<MediaStreamAudioSource*>(audioTrack->source());
</span><span class="cx"> ASSERT(!source->deviceId().isEmpty());
</span><span class="lines">@@ -664,8 +663,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isGraphOwner());
</span><span class="cx"> ASSERT(isAudioThread() || isAudioThreadFinished());
</span><del>- for (unsigned i = 0; i < m_finishedNodes.size(); i++)
- derefNode(m_finishedNodes[i]);
</del><ins>+ for (auto& node : m_finishedNodes)
+ derefNode(node);
</ins><span class="cx">
</span><span class="cx"> m_finishedNodes.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -692,8 +691,8 @@
</span><span class="cx"> void AudioContext::derefUnfinishedSourceNodes()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread() && isAudioThreadFinished());
</span><del>- for (unsigned i = 0; i < m_referencedNodes.size(); ++i)
- m_referencedNodes[i]->deref(AudioNode::RefTypeConnection);
</del><ins>+ for (auto& node : m_referencedNodes)
+ node->deref(AudioNode::RefTypeConnection);
</ins><span class="cx">
</span><span class="cx"> m_referencedNodes.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -825,10 +824,8 @@
</span><span class="cx"> void AudioContext::handleDeferredFinishDerefs()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isAudioThread() && isGraphOwner());
</span><del>- for (unsigned i = 0; i < m_deferredFinishDerefList.size(); ++i) {
- AudioNode* node = m_deferredFinishDerefList[i];
</del><ins>+ for (auto& node : m_deferredFinishDerefList)
</ins><span class="cx"> node->finishDeref(AudioNode::RefTypeConnection);
</span><del>- }
</del><span class="cx">
</span><span class="cx"> m_deferredFinishDerefList.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -922,8 +919,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isGraphOwner());
</span><span class="cx">
</span><del>- for (HashSet<AudioSummingJunction*>::iterator i = m_dirtySummingJunctions.begin(); i != m_dirtySummingJunctions.end(); ++i)
- (*i)->updateRenderingState();
</del><ins>+ for (auto& junction : m_dirtySummingJunctions)
+ junction->updateRenderingState();
</ins><span class="cx">
</span><span class="cx"> m_dirtySummingJunctions.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -932,8 +929,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isGraphOwner());
</span><span class="cx">
</span><del>- for (HashSet<AudioNodeOutput*>::iterator i = m_dirtyAudioNodeOutputs.begin(); i != m_dirtyAudioNodeOutputs.end(); ++i)
- (*i)->updateRenderingState();
</del><ins>+ for (auto& output : m_dirtyAudioNodeOutputs)
+ output->updateRenderingState();
</ins><span class="cx">
</span><span class="cx"> m_dirtyAudioNodeOutputs.clear();
</span><span class="cx"> }
</span><span class="lines">@@ -962,11 +959,9 @@
</span><span class="cx"> // Copy from m_automaticPullNodes to m_renderingAutomaticPullNodes.
</span><span class="cx"> m_renderingAutomaticPullNodes.resize(m_automaticPullNodes.size());
</span><span class="cx">
</span><del>- unsigned j = 0;
- for (HashSet<AudioNode*>::iterator i = m_automaticPullNodes.begin(); i != m_automaticPullNodes.end(); ++i, ++j) {
- AudioNode* output = *i;
- m_renderingAutomaticPullNodes[j] = output;
- }
</del><ins>+ unsigned i = 0;
+ for (auto& output : m_automaticPullNodes)
+ m_renderingAutomaticPullNodes[i++] = output;
</ins><span class="cx">
</span><span class="cx"> m_automaticPullNodesNeedUpdating = false;
</span><span class="cx"> }
</span><span class="lines">@@ -976,8 +971,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isAudioThread());
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < m_renderingAutomaticPullNodes.size(); ++i)
- m_renderingAutomaticPullNodes[i]->processIfNecessary(framesToProcess);
</del><ins>+ for (auto& node : m_renderingAutomaticPullNodes)
+ node->processIfNecessary(framesToProcess);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScriptExecutionContext* AudioContext::scriptExecutionContext() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -277,8 +277,8 @@
</span><span class="cx">
</span><span class="cx"> void AudioNode::updateChannelsForInputs()
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_inputs.size(); ++i)
- input(i)->changedOutputs();
</del><ins>+ for (auto& input : m_inputs)
+ input->changedOutputs();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EventTargetInterface AudioNode::eventTargetInterface() const
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(context()->isAudioThread() && context()->isGraphOwner());
</span><span class="cx">
</span><del>- for (const std::unique_ptr<AudioNodeInput>& savedInput : m_inputs) {
</del><ins>+ for (auto& savedInput : m_inputs) {
</ins><span class="cx"> if (input == savedInput.get()) {
</span><span class="cx"> input->updateInternalBus();
</span><span class="cx"> return;
</span><span class="lines">@@ -345,14 +345,14 @@
</span><span class="cx"> ASSERT(context()->isAudioThread());
</span><span class="cx">
</span><span class="cx"> // Process all of the AudioNodes connected to our inputs.
</span><del>- for (unsigned i = 0; i < m_inputs.size(); ++i)
- input(i)->pull(0, framesToProcess);
</del><ins>+ for (auto& input : m_inputs)
+ input->pull(0, framesToProcess);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool AudioNode::inputsAreSilent()
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_inputs.size(); ++i) {
- if (!input(i)->bus()->isSilent())
</del><ins>+ for (auto& input : m_inputs) {
+ if (!input->bus()->isSilent())
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -360,14 +360,14 @@
</span><span class="cx">
</span><span class="cx"> void AudioNode::silenceOutputs()
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_outputs.size(); ++i)
- output(i)->bus()->zero();
</del><ins>+ for (auto& output : m_outputs)
+ output->bus()->zero();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AudioNode::unsilenceOutputs()
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_outputs.size(); ++i)
- output(i)->bus()->clearSilentFlag();
</del><ins>+ for (auto& output : m_outputs)
+ output->bus()->clearSilentFlag();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AudioNode::enableOutputsIfNecessary()
</span><span class="lines">@@ -377,8 +377,8 @@
</span><span class="cx"> AudioContext::AutoLocker locker(*context());
</span><span class="cx">
</span><span class="cx"> m_isDisabled = false;
</span><del>- for (unsigned i = 0; i < m_outputs.size(); ++i)
- output(i)->enable();
</del><ins>+ for (auto& output : m_outputs)
+ output->enable();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -402,8 +402,8 @@
</span><span class="cx"> // longer any active connections.
</span><span class="cx"> if (nodeType() != NodeTypeConvolver && nodeType() != NodeTypeDelay) {
</span><span class="cx"> m_isDisabled = true;
</span><del>- for (unsigned i = 0; i < m_outputs.size(); ++i)
- output(i)->disable();
</del><ins>+ for (auto& output : m_outputs)
+ output->disable();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -492,8 +492,8 @@
</span><span class="cx"> if (!m_normalRefCount) {
</span><span class="cx"> if (!m_isMarkedForDeletion) {
</span><span class="cx"> // All references are gone - we need to go away.
</span><del>- for (unsigned i = 0; i < m_outputs.size(); ++i)
- output(i)->disconnectAll(); // This will deref() nodes we're connected to.
</del><ins>+ for (auto& output : m_outputs)
+ output->disconnectAll(); // This will deref() nodes we're connected to.
</ins><span class="cx">
</span><span class="cx"> // Mark for deletion at end of each render quantum or when context shuts down.
</span><span class="cx"> context()->markForDeletion(this);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioNodeInputcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNodeInput.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -151,8 +151,7 @@
</span><span class="cx"> // Find the number of channels of the connection with the largest number of channels.
</span><span class="cx"> unsigned maxChannels = 1; // one channel is the minimum allowed
</span><span class="cx">
</span><del>- for (HashSet<AudioNodeOutput*>::iterator i = m_outputs.begin(); i != m_outputs.end(); ++i) {
- AudioNodeOutput* output = *i;
</del><ins>+ for (auto& output : m_outputs) {
</ins><span class="cx"> // Use output()->numberOfChannels() instead of output->bus()->numberOfChannels(),
</span><span class="cx"> // because the calling of AudioNodeOutput::bus() is not safe here.
</span><span class="cx"> maxChannels = std::max(maxChannels, output->numberOfChannels());
</span><span class="lines">@@ -198,8 +197,7 @@
</span><span class="cx">
</span><span class="cx"> AudioBus::ChannelInterpretation interpretation = node()->internalChannelInterpretation();
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < numberOfRenderingConnections(); ++i) {
- AudioNodeOutput* output = renderingOutput(i);
</del><ins>+ for (auto& output : m_renderingOutputs) {
</ins><span class="cx"> ASSERT(output);
</span><span class="cx">
</span><span class="cx"> // Render audio from this output.
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioNodeOutputcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioNodeOutput.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -98,8 +98,7 @@
</span><span class="cx">
</span><span class="cx"> if (isChannelCountKnown()) {
</span><span class="cx"> // Announce to any nodes we're connected to that we changed our channel count for its input.
</span><del>- for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) {
- AudioNodeInput* input = *i;
</del><ins>+ for (auto& input : m_inputs) {
</ins><span class="cx"> AudioNode* connectionNode = input->node();
</span><span class="cx"> connectionNode->checkNumberOfChannelsForInput(input);
</span><span class="cx"> }
</span><span class="lines">@@ -230,10 +229,8 @@
</span><span class="cx"> ASSERT(context()->isGraphOwner());
</span><span class="cx">
</span><span class="cx"> if (m_isEnabled) {
</span><del>- for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) {
- AudioNodeInput* input = *i;
</del><ins>+ for (auto& input : m_inputs)
</ins><span class="cx"> input->disable(this);
</span><del>- }
</del><span class="cx"> m_isEnabled = false;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -243,10 +240,8 @@
</span><span class="cx"> ASSERT(context()->isGraphOwner());
</span><span class="cx">
</span><span class="cx"> if (!m_isEnabled) {
</span><del>- for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) {
- AudioNodeInput* input = *i;
</del><ins>+ for (auto& input : m_inputs)
</ins><span class="cx"> input->enable(this);
</span><del>- }
</del><span class="cx"> m_isEnabled = true;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioParamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioParam.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioParam.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioParam.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -139,8 +139,7 @@
</span><span class="cx"> RefPtr<AudioBus> summingBus = AudioBus::create(1, numberOfValues, false);
</span><span class="cx"> summingBus->setChannelMemory(0, values, numberOfValues);
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < numberOfRenderingConnections(); ++i) {
- AudioNodeOutput* output = renderingOutput(i);
</del><ins>+ for (auto& output : m_renderingOutputs) {
</ins><span class="cx"> ASSERT(output);
</span><span class="cx">
</span><span class="cx"> // Render audio from this output.
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioParamTimelinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -84,15 +84,17 @@
</span><span class="cx">
</span><span class="cx"> unsigned i = 0;
</span><span class="cx"> float insertTime = event.time();
</span><del>- for (i = 0; i < m_events.size(); ++i) {
</del><ins>+ for (auto& paramEvent : m_events) {
</ins><span class="cx"> // Overwrite same event type and time.
</span><del>- if (m_events[i].time() == insertTime && m_events[i].type() == event.type()) {
- m_events[i] = event;
</del><ins>+ if (paramEvent.time() == insertTime && paramEvent.type() == event.type()) {
+ paramEvent = event;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_events[i].time() > insertTime)
</del><ins>+ if (paramEvent.time() > insertTime)
</ins><span class="cx"> break;
</span><ins>+
+ ++i;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_events.insert(i, event);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioSummingJunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -62,10 +62,9 @@
</span><span class="cx"> if (m_renderingStateNeedUpdating && canUpdateState()) {
</span><span class="cx"> // Copy from m_outputs to m_renderingOutputs.
</span><span class="cx"> m_renderingOutputs.resize(m_outputs.size());
</span><del>- unsigned j = 0;
- for (HashSet<AudioNodeOutput*>::iterator i = m_outputs.begin(); i != m_outputs.end(); ++i, ++j) {
- AudioNodeOutput* output = *i;
- m_renderingOutputs[j] = output;
</del><ins>+ unsigned i = 0;
+ for (auto& output : m_outputs) {
+ m_renderingOutputs[i++] = output;
</ins><span class="cx"> output->updateRenderingState();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioMediaStreamAudioSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -81,15 +81,15 @@
</span><span class="cx"> void MediaStreamAudioSource::setAudioFormat(size_t numberOfChannels, float sampleRate)
</span><span class="cx"> {
</span><span class="cx"> MutexLocker locker(m_audioConsumersLock);
</span><del>- for (Vector<RefPtr<AudioDestinationConsumer>>::iterator it = m_audioConsumers.begin(); it != m_audioConsumers.end(); ++it)
- (*it)->setFormat(numberOfChannels, sampleRate);
</del><ins>+ for (auto& consumer : m_audioConsumers)
+ consumer->setFormat(numberOfChannels, sampleRate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MediaStreamAudioSource::consumeAudio(AudioBus* bus, size_t numberOfFrames)
</span><span class="cx"> {
</span><span class="cx"> MutexLocker locker(m_audioConsumersLock);
</span><del>- for (Vector<RefPtr<AudioDestinationConsumer>>::iterator it = m_audioConsumers.begin(); it != m_audioConsumers.end(); ++it)
- (*it)->consumeAudio(bus, numberOfFrames);
</del><ins>+ for (auto& consumer : m_audioConsumers)
+ consumer->consumeAudio(bus, numberOfFrames);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioWaveShaperProcessorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/WaveShaperProcessor.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/WaveShaperProcessor.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webaudio/WaveShaperProcessor.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -65,9 +65,9 @@
</span><span class="cx"> m_oversample = oversample;
</span><span class="cx">
</span><span class="cx"> if (oversample != OverSampleNone) {
</span><del>- for (unsigned i = 0; i < m_kernels.size(); ++i) {
- WaveShaperDSPKernel* kernel = static_cast<WaveShaperDSPKernel*>(m_kernels[i].get());
- kernel->lazyInitializeOversampling();
</del><ins>+ for (auto& audioDSPKernel : m_kernels) {
+ WaveShaperDSPKernel& kernel = static_cast<WaveShaperDSPKernel&>(*audioDSPKernel);
+ kernel.lazyInitializeOversampling();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseThread.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -150,10 +150,10 @@
</span><span class="cx"> while (auto task = m_pausedQueue.tryGetMessage())
</span><span class="cx"> pausedTasks.append(WTF::move(task));
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < pausedTasks.size(); ++i) {
</del><ins>+ for (auto& pausedTask : pausedTasks) {
</ins><span class="cx"> AutodrainedPool pool;
</span><span class="cx">
</span><del>- std::unique_ptr<DatabaseTask> task(pausedTasks[i].release());
</del><ins>+ std::unique_ptr<DatabaseTask> task(pausedTask.release());
</ins><span class="cx"> {
</span><span class="cx"> MutexLocker pausedLocker(m_pausedMutex);
</span><span class="cx"> if (m_paused) {
</span><span class="lines">@@ -203,9 +203,8 @@
</span><span class="cx"> // As the call to close will modify the original set, we must take a copy to iterate over.
</span><span class="cx"> DatabaseSet openSetCopy;
</span><span class="cx"> openSetCopy.swap(m_openDatabaseSet);
</span><del>- DatabaseSet::iterator end = openSetCopy.end();
- for (DatabaseSet::iterator it = openSetCopy.begin(); it != end; ++it)
- (*it).get()->close();
</del><ins>+ for (auto& openDatabase : openSetCopy)
+ openDatabase->close();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Detach the thread so its resources are no longer of any concern to anyone else
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseTrackercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -338,20 +338,16 @@
</span><span class="cx"> if (!nameMap)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- DatabaseNameMap::const_iterator dbNameMapEndIt = nameMap->end();
- for (DatabaseNameMap::const_iterator dbNameMapIt = nameMap->begin(); dbNameMapIt != dbNameMapEndIt; ++dbNameMapIt) {
- DatabaseSet* databaseSet = dbNameMapIt->value;
- DatabaseSet::const_iterator dbSetEndIt = databaseSet->end();
- for (DatabaseSet::const_iterator dbSetIt = databaseSet->begin(); dbSetIt != dbSetEndIt; ++dbSetIt) {
- if ((*dbSetIt)->databaseContext() == context)
- openDatabases.append(*dbSetIt);
</del><ins>+ for (auto& databaseSet : nameMap->values()) {
+ for (auto& database : *databaseSet) {
+ if (database->databaseContext() == context)
+ openDatabases.append(database);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Vector<RefPtr<DatabaseBackendBase>>::const_iterator openDatabasesEndIt = openDatabases.end();
- for (Vector<RefPtr<DatabaseBackendBase>>::const_iterator openDatabasesIt = openDatabases.begin(); openDatabasesIt != openDatabasesEndIt; ++openDatabasesIt)
- (*openDatabasesIt)->interrupt();
</del><ins>+ for (auto& openDatabase : openDatabases)
+ openDatabase->interrupt();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String DatabaseTracker::originPath(SecurityOrigin* origin) const
</span><span class="lines">@@ -482,8 +478,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (Vector<String>::iterator iter = temp.begin(); iter != temp.end(); ++iter)
- resultVector.append(iter->isolatedCopy());
</del><ins>+ for (auto& databaseName : temp)
+ resultVector.append(databaseName.isolatedCopy());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -670,8 +666,8 @@
</span><span class="cx"> if (!databaseSet)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- for (DatabaseSet::iterator it = databaseSet->begin(); it != databaseSet->end(); ++it)
- databases->add(*it);
</del><ins>+ for (auto& database : *databaseSet)
+ databases->add(database);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<OriginLock> DatabaseTracker::originLockFor(SecurityOrigin* origin)
</span><span class="lines">@@ -724,12 +720,9 @@
</span><span class="cx"> {
</span><span class="cx"> String originPath = this->originPath(origin);
</span><span class="cx"> unsigned long long diskUsage = 0;
</span><del>- Vector<String> fileNames = listDirectory(originPath, String("*.db"));
- Vector<String>::iterator fileName = fileNames.begin();
- Vector<String>::iterator lastFileName = fileNames.end();
- for (; fileName != lastFileName; ++fileName) {
</del><ins>+ for (auto& fileName : listDirectory(originPath, ASCIILiteral("*.db"))) {
</ins><span class="cx"> long long size;
</span><del>- getFileSize(*fileName, size);
</del><ins>+ getFileSize(fileName, size);
</ins><span class="cx"> diskUsage += size;
</span><span class="cx"> }
</span><span class="cx"> return diskUsage;
</span><span class="lines">@@ -855,8 +848,8 @@
</span><span class="cx"> Vector<RefPtr<SecurityOrigin>> originsCopy;
</span><span class="cx"> origins(originsCopy);
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < originsCopy.size(); ++i)
- deleteOrigin(originsCopy[i].get());
</del><ins>+ for (auto& origin : originsCopy)
+ deleteOrigin(origin.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DatabaseTracker::deleteDatabasesModifiedSince(std::chrono::system_clock::time_point time)
</span><span class="lines">@@ -908,10 +901,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // We drop the lock here because holding locks during a call to deleteDatabaseFile will deadlock.
</span><del>- for (unsigned i = 0; i < databaseNames.size(); ++i) {
- if (!deleteDatabaseFile(origin, databaseNames[i])) {
</del><ins>+ for (auto& name : databaseNames) {
+ if (!deleteDatabaseFile(origin, name)) {
</ins><span class="cx"> // Even if the file can't be deleted, we want to try and delete the rest, don't return early here.
</span><del>- LOG_ERROR("Unable to delete file for database %s in origin %s", databaseNames[i].ascii().data(), origin->databaseIdentifier().ascii().data());
</del><ins>+ LOG_ERROR("Unable to delete file for database %s in origin %s", name.ascii().data(), origin->databaseIdentifier().ascii().data());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -973,8 +966,8 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> m_client->dispatchDidDeleteDatabaseOrigin();
</span><span class="cx"> #endif
</span><del>- for (unsigned i = 0; i < databaseNames.size(); ++i)
- m_client->dispatchDidModifyDatabase(origin, databaseNames[i]);
</del><ins>+ for (auto& name : databaseNames)
+ m_client->dispatchDidModifyDatabase(origin, name);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1178,16 +1171,15 @@
</span><span class="cx"> DatabaseSet* databaseSet = nameMap->get(name);
</span><span class="cx"> if (databaseSet && databaseSet->size()) {
</span><span class="cx"> // We have some database open with this name. Mark them as deleted.
</span><del>- DatabaseSet::const_iterator end = databaseSet->end();
- for (DatabaseSet::const_iterator it = databaseSet->begin(); it != end; ++it)
- deletedDatabases.append(*it);
</del><ins>+ for (auto& database : *databaseSet)
+ deletedDatabases.append(database);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < deletedDatabases.size(); ++i)
- deletedDatabases[i]->markAsDeletedAndClose();
</del><ins>+ for (auto& database : deletedDatabases)
+ database->markAsDeletedAndClose();
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> return SQLiteFileSystem::deleteDatabaseFile(fullPath);
</span><span class="lines">@@ -1230,17 +1222,15 @@
</span><span class="cx"> {
</span><span class="cx"> MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard);
</span><span class="cx"> if (m_openDatabaseMap) {
</span><del>- DatabaseOriginMap::const_iterator originMapEnd = m_openDatabaseMap->end();
- for (DatabaseOriginMap::const_iterator originMapIt = m_openDatabaseMap->begin(); originMapIt != originMapEnd; ++originMapIt) {
- RefPtr<SecurityOrigin> origin = originMapIt->key;
- DatabaseNameMap* databaseNameMap = originMapIt->value;
</del><ins>+ for (auto& openDatabase : *m_openDatabaseMap) {
+ auto& origin = openDatabase.key;
+ DatabaseNameMap* databaseNameMap = openDatabase.value;
</ins><span class="cx"> Vector<String> deletedDatabaseNamesForThisOrigin;
</span><span class="cx">
</span><span class="cx"> // Loop through all opened databases in this origin. Get the current database file path of each database and see if
</span><span class="cx"> // it still matches the path stored in the opened database object.
</span><del>- DatabaseNameMap::const_iterator dbNameMapEnd = databaseNameMap->end();
- for (DatabaseNameMap::const_iterator dbNameMapIt = databaseNameMap->begin(); dbNameMapIt != dbNameMapEnd; ++dbNameMapIt) {
- String databaseName = dbNameMapIt->key;
</del><ins>+ for (auto& databases : *databaseNameMap) {
+ String databaseName = databases.key;
</ins><span class="cx"> String databaseFileName;
</span><span class="cx"> SQLiteStatement statement(m_database, "SELECT path FROM Databases WHERE origin=? AND name=?;");
</span><span class="cx"> if (statement.prepare() == SQLITE_OK) {
</span><span class="lines">@@ -1252,11 +1242,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool foundDeletedDatabase = false;
</span><del>- DatabaseSet* databaseSet = dbNameMapIt->value;
- DatabaseSet::const_iterator dbEnd = databaseSet->end();
- for (DatabaseSet::const_iterator dbIt = databaseSet->begin(); dbIt != dbEnd; ++dbIt) {
- Database* db = static_cast<Database*>(*dbIt);
-
</del><ins>+ for (auto& db : *databases.value) {
</ins><span class="cx"> // We are done if this database has already been marked as deleted.
</span><span class="cx"> if (db->deleted())
</span><span class="cx"> continue;
</span><span class="lines">@@ -1279,19 +1265,18 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < deletedDatabases.size(); ++i)
- deletedDatabases[i]->markAsDeletedAndClose();
-
- DeletedDatabaseMap::const_iterator end = deletedDatabaseMap.end();
- for (DeletedDatabaseMap::const_iterator it = deletedDatabaseMap.begin(); it != end; ++it) {
- SecurityOrigin* origin = it->key.get();
</del><ins>+ for (auto& deletedDatabase : deletedDatabases)
+ deletedDatabase->markAsDeletedAndClose();
+
+ for (auto& deletedDatabase : deletedDatabaseMap) {
+ SecurityOrigin* origin = deletedDatabase.key.get();
</ins><span class="cx"> if (m_client)
</span><span class="cx"> m_client->dispatchDidModifyOrigin(origin);
</span><span class="cx">
</span><del>- const Vector<String>& databaseNames = it->value;
- for (unsigned i = 0; i < databaseNames.size(); ++i) {
</del><ins>+ const Vector<String>& databaseNames = deletedDatabase.value;
+ for (auto& databaseName : databaseNames) {
</ins><span class="cx"> if (m_client)
</span><del>- m_client->dispatchDidModifyDatabase(origin, databaseNames[i]);
</del><ins>+ m_client->dispatchDidModifyDatabase(origin, databaseName);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1365,21 +1350,10 @@
</span><span class="cx">
</span><span class="cx"> // This walking is - sadly - the only reliable way to get at each open database thread.
</span><span class="cx"> // This will be cleaner once <rdar://problem/5680441> or some other DB thread consolidation takes place.
</span><del>- DatabaseOriginMap::iterator i = m_openDatabaseMap.get()->begin();
- DatabaseOriginMap::iterator end = m_openDatabaseMap.get()->end();
-
- for (; i != end; ++i) {
- DatabaseNameMap* databaseNameMap = i->value;
- DatabaseNameMap::iterator j = databaseNameMap->begin();
- DatabaseNameMap::iterator dbNameMapEnd = databaseNameMap->end();
- for (; j != dbNameMapEnd; ++j) {
- DatabaseSet* databaseSet = j->value;
- DatabaseSet::iterator k = databaseSet->begin();
- DatabaseSet::iterator dbSetEnd = databaseSet->end();
- for (; k != dbSetEnd; ++k) {
- DatabaseContext* context = (*k)->databaseContext();
- context->setPaused(paused);
- }
</del><ins>+ for (auto& databaseNameMap : m_openDatabaseMap->values()) {
+ for (auto& databaseSet : databaseNameMap->values()) {
+ for (auto& database : *databaseSet)
+ database->databaseContext()->setPaused(paused);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseSQLTransactionCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCoordinator.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCoordinator.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/webdatabase/SQLTransactionCoordinator.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -119,21 +119,14 @@
</span><span class="cx"> m_isShuttingDown = true;
</span><span class="cx">
</span><span class="cx"> // Notify all transactions in progress that the database thread is shutting down
</span><del>- for (CoordinationInfoMap::iterator coordinationInfoIterator = m_coordinationInfoMap.begin();
- coordinationInfoIterator != m_coordinationInfoMap.end(); ++coordinationInfoIterator) {
- CoordinationInfo& info = coordinationInfoIterator->value;
-
</del><ins>+ for (auto& info : m_coordinationInfoMap.values()) {
</ins><span class="cx"> // Clean up transactions that have reached "lockAcquired":
</span><span class="cx"> // Transaction phase 4 cleanup. See comment on "What happens if a
</span><span class="cx"> // transaction is interrupted?" at the top of SQLTransactionBackend.cpp.
</span><span class="cx"> if (info.activeWriteTransaction)
</span><span class="cx"> info.activeWriteTransaction->notifyDatabaseThreadIsShuttingDown();
</span><del>- for (HashSet<RefPtr<SQLTransactionBackend>>::iterator activeReadTransactionsIterator =
- info.activeReadTransactions.begin();
- activeReadTransactionsIterator != info.activeReadTransactions.end();
- ++activeReadTransactionsIterator) {
- (*activeReadTransactionsIterator)->notifyDatabaseThreadIsShuttingDown();
- }
</del><ins>+ for (auto& transaction : info.activeReadTransactions)
+ transaction->notifyDatabaseThreadIsShuttingDown();
</ins><span class="cx">
</span><span class="cx"> // Clean up transactions that have NOT reached "lockAcquired":
</span><span class="cx"> // Transaction phase 3 cleanup. See comment on "What happens if a
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebsocketsWebSocketcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -260,18 +260,18 @@
</span><span class="cx"> //
</span><span class="cx"> // Here, we throw SYNTAX_ERR if the given protocols do not meet the latter criteria. This behavior does not
</span><span class="cx"> // comply with WebSocket API specification, but it seems to be the only reasonable way to handle this conflict.
</span><del>- for (size_t i = 0; i < protocols.size(); ++i) {
- if (!isValidProtocolString(protocols[i])) {
- scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Wrong protocol for WebSocket '" + encodeProtocolString(protocols[i]) + "'");
</del><ins>+ for (auto& protocol : protocols) {
+ if (!isValidProtocolString(protocol)) {
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Wrong protocol for WebSocket '" + encodeProtocolString(protocol) + "'");
</ins><span class="cx"> m_state = CLOSED;
</span><span class="cx"> ec = SYNTAX_ERR;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> HashSet<String> visited;
</span><del>- for (size_t i = 0; i < protocols.size(); ++i) {
- if (!visited.add(protocols[i]).isNewEntry) {
- scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocols[i]) + "'");
</del><ins>+ for (auto& protocol : protocols) {
+ if (!visited.add(protocol).isNewEntry) {
+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocol) + "'");
</ins><span class="cx"> m_state = CLOSED;
</span><span class="cx"> ec = SYNTAX_ERR;
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebsocketsWebSocketExtensionDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx">
</span><span class="cx"> void WebSocketExtensionDispatcher::addProcessor(std::unique_ptr<WebSocketExtensionProcessor> processor)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_processors.size(); ++i) {
- if (m_processors[i]->extensionToken() == processor->extensionToken())
</del><ins>+ for (auto& extensionProcessor : m_processors) {
+ if (extensionProcessor->extensionToken() == processor->extensionToken())
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> ASSERT(processor->handshakeString().length());
</span><span class="lines">@@ -81,12 +81,12 @@
</span><span class="cx"> m_acceptedExtensionsBuilder.appendLiteral(", ");
</span><span class="cx"> m_acceptedExtensionsBuilder.append(extensionToken);
</span><span class="cx"> // FIXME: Should use ListHashSet to keep the order of the parameters.
</span><del>- for (HashMap<String, String>::const_iterator iterator = extensionParameters.begin(); iterator != extensionParameters.end(); ++iterator) {
</del><ins>+ for (auto& parameter : extensionParameters) {
</ins><span class="cx"> m_acceptedExtensionsBuilder.appendLiteral("; ");
</span><del>- m_acceptedExtensionsBuilder.append(iterator->key);
- if (!iterator->value.isNull()) {
</del><ins>+ m_acceptedExtensionsBuilder.append(parameter.key);
+ if (!parameter.value.isNull()) {
</ins><span class="cx"> m_acceptedExtensionsBuilder.append('=');
</span><del>- m_acceptedExtensionsBuilder.append(iterator->value);
</del><ins>+ m_acceptedExtensionsBuilder.append(parameter.value);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -118,9 +118,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- size_t index;
- for (index = 0; index < m_processors.size(); ++index) {
- WebSocketExtensionProcessor* processor = m_processors[index].get();
</del><ins>+ size_t index = 0;
+ for (auto& processor : m_processors) {
</ins><span class="cx"> if (extensionToken == processor->extensionToken()) {
</span><span class="cx"> if (processor->processResponse(extensionParameters)) {
</span><span class="cx"> appendAcceptedExtension(extensionToken, extensionParameters);
</span><span class="lines">@@ -129,6 +128,7 @@
</span><span class="cx"> fail(processor->failureReason());
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><ins>+ ++index;
</ins><span class="cx"> }
</span><span class="cx"> // There is no extension which can process the response.
</span><span class="cx"> if (index == m_processors.size()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebsocketsWebSocketHandshakecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (185315 => 185316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp        2015-06-08 14:08:24 UTC (rev 185315)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp        2015-06-08 14:36:47 UTC (rev 185316)
</span><span class="lines">@@ -224,8 +224,8 @@
</span><span class="cx"> // order is not meaningful. Thus, it's ok to send the order we constructed
</span><span class="cx"> // the fields.
</span><span class="cx">
</span><del>- for (size_t i = 0; i < fields.size(); i++) {
- builder.append(fields[i]);
</del><ins>+ for (auto& field : fields) {
+ builder.append(field);
</ins><span class="cx"> builder.appendLiteral("\r\n");
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>