<!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>[178603] trunk/Source</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/178603">178603</a></dd>
<dt>Author</dt> <dd>burg@cs.washington.edu</dd>
<dt>Date</dt> <dd>2015-01-16 14:13:08 -0800 (Fri, 16 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Replay: purge remaining PassRefPtr uses and minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=140456
Reviewed by Andreas Kling.
Source/JavaScriptCore:
Get rid of PassRefPtr. Introduce default initializers where it makes sense.
Remove mistaken uses of AtomicString that were not removed as part of <a href="http://trac.webkit.org/projects/webkit/changeset/174113">r174113</a>.
* replay/EmptyInputCursor.h:
* replay/InputCursor.h:
(JSC::InputCursor::InputCursor):
Source/WebCore:
Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
Remove mistaken uses of AtomicString that were not removed as part of <a href="http://trac.webkit.org/projects/webkit/changeset/174113">r174113</a>.
No new tests, no behavior changed.
* inspector/InspectorReplayAgent.cpp:
(WebCore::SerializeInputToJSONFunctor::operator()):
(WebCore::SerializeInputToJSONFunctor::returnValue):
(WebCore::InspectorReplayAgent::sessionCreated):
(WebCore::InspectorReplayAgent::sessionModified):
(WebCore::InspectorReplayAgent::sessionLoaded):
(WebCore::InspectorReplayAgent::segmentCreated):
(WebCore::InspectorReplayAgent::segmentCompleted):
(WebCore::InspectorReplayAgent::segmentLoaded):
(WebCore::InspectorReplayAgent::switchSession):
(WebCore::InspectorReplayAgent::insertSessionSegment):
(WebCore::InspectorReplayAgent::removeSessionSegment):
(WebCore::InspectorReplayAgent::findSession):
(WebCore::InspectorReplayAgent::findSegment):
* inspector/InspectorReplayAgent.h:
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::create):
(WebCore::CapturingInputCursor::loadInput):
* replay/CapturingInputCursor.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
* replay/EventLoopInputDispatcher.h:
* replay/FunctorInputCursor.h:
(WebCore::FunctorInputCursor::FunctorInputCursor):
(WebCore::FunctorInputCursor::loadInput):
* replay/ReplayController.cpp:
(WebCore::ReplayController::ReplayController):
(WebCore::ReplayController::setForceDeterministicSettings):
(WebCore::ReplayController::setSessionState):
(WebCore::ReplayController::setSegmentState):
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::frameNavigated):
(WebCore::ReplayController::loadedSession):
(WebCore::ReplayController::loadedSegment):
(WebCore::ReplayController::activeInputCursor):
(WebCore::ReplayController::dispatcher):
* replay/ReplayController.h:
* replay/ReplaySession.cpp:
(WebCore::ReplaySession::create):
(WebCore::ReplaySession::at):
(WebCore::ReplaySession::appendSegment):
(WebCore::ReplaySession::insertSegment):
(WebCore::ReplaySession::removeSegment):
* replay/ReplaySession.h:
* replay/ReplaySessionSegment.cpp:
(WebCore::ReplaySessionSegment::create):
(WebCore::ReplaySessionSegment::ReplaySessionSegment):
* replay/ReplaySessionSegment.h:
* replay/ReplayingInputCursor.cpp:
(WebCore::ReplayingInputCursor::ReplayingInputCursor):
(WebCore::ReplayingInputCursor::create):
(WebCore::ReplayingInputCursor::loadInput):
* replay/ReplayingInputCursor.h:
* replay/SegmentedInputStorage.cpp:
(WebCore::SegmentedInputStorage::store):
(WebCore::SegmentedInputStorage::queue):
(WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
* replay/SegmentedInputStorage.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayEmptyInputCursorh">trunk/Source/JavaScriptCore/replay/EmptyInputCursor.h</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayInputCursorh">trunk/Source/JavaScriptCore/replay/InputCursor.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorReplayAgentcpp">trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorReplayAgenth">trunk/Source/WebCore/inspector/InspectorReplayAgent.h</a></li>
<li><a href="#trunkSourceWebCorereplayCapturingInputCursorcpp">trunk/Source/WebCore/replay/CapturingInputCursor.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayCapturingInputCursorh">trunk/Source/WebCore/replay/CapturingInputCursor.h</a></li>
<li><a href="#trunkSourceWebCorereplayEventLoopInputDispatchercpp">trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayEventLoopInputDispatcherh">trunk/Source/WebCore/replay/EventLoopInputDispatcher.h</a></li>
<li><a href="#trunkSourceWebCorereplayFunctorInputCursorh">trunk/Source/WebCore/replay/FunctorInputCursor.h</a></li>
<li><a href="#trunkSourceWebCorereplayReplayControllercpp">trunk/Source/WebCore/replay/ReplayController.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplayControllerh">trunk/Source/WebCore/replay/ReplayController.h</a></li>
<li><a href="#trunkSourceWebCorereplayReplaySessioncpp">trunk/Source/WebCore/replay/ReplaySession.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplaySessionh">trunk/Source/WebCore/replay/ReplaySession.h</a></li>
<li><a href="#trunkSourceWebCorereplayReplaySessionSegmentcpp">trunk/Source/WebCore/replay/ReplaySessionSegment.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplaySessionSegmenth">trunk/Source/WebCore/replay/ReplaySessionSegment.h</a></li>
<li><a href="#trunkSourceWebCorereplayReplayingInputCursorcpp">trunk/Source/WebCore/replay/ReplayingInputCursor.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplayingInputCursorh">trunk/Source/WebCore/replay/ReplayingInputCursor.h</a></li>
<li><a href="#trunkSourceWebCorereplaySegmentedInputStoragecpp">trunk/Source/WebCore/replay/SegmentedInputStorage.cpp</a></li>
<li><a href="#trunkSourceWebCorereplaySegmentedInputStorageh">trunk/Source/WebCore/replay/SegmentedInputStorage.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2015-01-16 Brian J. Burg <burg@cs.washington.edu>
</span><span class="cx">
</span><ins>+ Web Replay: purge remaining PassRefPtr uses and minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=140456
+
+ Reviewed by Andreas Kling.
+
+ Get rid of PassRefPtr. Introduce default initializers where it makes sense.
+ Remove mistaken uses of AtomicString that were not removed as part of r174113.
+
+ * replay/EmptyInputCursor.h:
+ * replay/InputCursor.h:
+ (JSC::InputCursor::InputCursor):
+
+2015-01-16 Brian J. Burg <burg@cs.washington.edu>
+
</ins><span class="cx"> Web Inspector: code generator should fail on duplicate parameter and member names
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=140555
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayEmptyInputCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/EmptyInputCursor.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/EmptyInputCursor.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/JavaScriptCore/replay/EmptyInputCursor.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -40,9 +40,9 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~EmptyInputCursor() { }
</span><span class="cx">
</span><del>- static PassRefPtr<EmptyInputCursor> create()
</del><ins>+ static Ref<EmptyInputCursor> create()
</ins><span class="cx"> {
</span><del>- return adoptRef(new EmptyInputCursor());
</del><ins>+ return adoptRef(*new EmptyInputCursor());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual bool isCapturing() const override { return false; }
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- virtual NondeterministicInputBase* loadInput(InputQueue, const AtomicString&) override
</del><ins>+ virtual NondeterministicInputBase* loadInput(InputQueue, const String&) override
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayInputCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/InputCursor.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/InputCursor.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/JavaScriptCore/replay/InputCursor.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -33,18 +33,13 @@
</span><span class="cx"> #include "NondeterministicInput.h"
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><del>-#include <wtf/text/AtomicString.h>
</del><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><span class="cx"> class InputCursor : public RefCounted<InputCursor> {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(InputCursor);
</span><span class="cx"> public:
</span><del>- InputCursor()
- : m_withinEventLoopInputExtent(false)
- {
- }
-
</del><ins>+ InputCursor() { }
</ins><span class="cx"> virtual ~InputCursor() { }
</span><span class="cx">
</span><span class="cx"> virtual bool isCapturing() const = 0;
</span><span class="lines">@@ -78,10 +73,10 @@
</span><span class="cx"> virtual void storeInput(std::unique_ptr<NondeterministicInputBase>) = 0;
</span><span class="cx"> virtual NondeterministicInputBase* uncheckedLoadInput(InputQueue) = 0;
</span><span class="cx"> protected:
</span><del>- virtual NondeterministicInputBase* loadInput(InputQueue, const AtomicString&) = 0;
</del><ins>+ virtual NondeterministicInputBase* loadInput(InputQueue, const String&) = 0;
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- bool m_withinEventLoopInputExtent;
</del><ins>+ bool m_withinEventLoopInputExtent {false};
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/ChangeLog        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -1,3 +1,81 @@
</span><ins>+2015-01-16 Brian J. Burg <burg@cs.washington.edu>
+
+ Web Replay: purge remaining PassRefPtr uses and minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=140456
+
+ Reviewed by Andreas Kling.
+
+ Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
+ uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
+
+ Remove mistaken uses of AtomicString that were not removed as part of r174113.
+
+ No new tests, no behavior changed.
+
+ * inspector/InspectorReplayAgent.cpp:
+ (WebCore::SerializeInputToJSONFunctor::operator()):
+ (WebCore::SerializeInputToJSONFunctor::returnValue):
+ (WebCore::InspectorReplayAgent::sessionCreated):
+ (WebCore::InspectorReplayAgent::sessionModified):
+ (WebCore::InspectorReplayAgent::sessionLoaded):
+ (WebCore::InspectorReplayAgent::segmentCreated):
+ (WebCore::InspectorReplayAgent::segmentCompleted):
+ (WebCore::InspectorReplayAgent::segmentLoaded):
+ (WebCore::InspectorReplayAgent::switchSession):
+ (WebCore::InspectorReplayAgent::insertSessionSegment):
+ (WebCore::InspectorReplayAgent::removeSessionSegment):
+ (WebCore::InspectorReplayAgent::findSession):
+ (WebCore::InspectorReplayAgent::findSegment):
+ * inspector/InspectorReplayAgent.h:
+ * replay/CapturingInputCursor.cpp:
+ (WebCore::CapturingInputCursor::CapturingInputCursor):
+ (WebCore::CapturingInputCursor::create):
+ (WebCore::CapturingInputCursor::loadInput):
+ * replay/CapturingInputCursor.h:
+ * replay/EventLoopInputDispatcher.cpp:
+ (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
+ * replay/EventLoopInputDispatcher.h:
+ * replay/FunctorInputCursor.h:
+ (WebCore::FunctorInputCursor::FunctorInputCursor):
+ (WebCore::FunctorInputCursor::loadInput):
+ * replay/ReplayController.cpp:
+ (WebCore::ReplayController::ReplayController):
+ (WebCore::ReplayController::setForceDeterministicSettings):
+ (WebCore::ReplayController::setSessionState):
+ (WebCore::ReplayController::setSegmentState):
+ (WebCore::ReplayController::switchSession):
+ (WebCore::ReplayController::createSegment):
+ (WebCore::ReplayController::completeSegment):
+ (WebCore::ReplayController::loadSegmentAtIndex):
+ (WebCore::ReplayController::unloadSegment):
+ (WebCore::ReplayController::frameNavigated):
+ (WebCore::ReplayController::loadedSession):
+ (WebCore::ReplayController::loadedSegment):
+ (WebCore::ReplayController::activeInputCursor):
+ (WebCore::ReplayController::dispatcher):
+ * replay/ReplayController.h:
+ * replay/ReplaySession.cpp:
+ (WebCore::ReplaySession::create):
+ (WebCore::ReplaySession::at):
+ (WebCore::ReplaySession::appendSegment):
+ (WebCore::ReplaySession::insertSegment):
+ (WebCore::ReplaySession::removeSegment):
+ * replay/ReplaySession.h:
+ * replay/ReplaySessionSegment.cpp:
+ (WebCore::ReplaySessionSegment::create):
+ (WebCore::ReplaySessionSegment::ReplaySessionSegment):
+ * replay/ReplaySessionSegment.h:
+ * replay/ReplayingInputCursor.cpp:
+ (WebCore::ReplayingInputCursor::ReplayingInputCursor):
+ (WebCore::ReplayingInputCursor::create):
+ (WebCore::ReplayingInputCursor::loadInput):
+ * replay/ReplayingInputCursor.h:
+ * replay/SegmentedInputStorage.cpp:
+ (WebCore::SegmentedInputStorage::store):
+ (WebCore::SegmentedInputStorage::queue):
+ (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
+ * replay/SegmentedInputStorage.h:
+
</ins><span class="cx"> 2015-01-16 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove assertion that Page::m_editorClient is non-null.
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorReplayAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/inspector/InspectorReplayAgent.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -118,10 +118,10 @@
</span><span class="cx"> LOG(WebReplay, "%-25s Writing %5zu: %s\n", "[SerializeInput]", index, input->type().ascii().data());
</span><span class="cx">
</span><span class="cx"> if (RefPtr<Inspector::Protocol::Replay::ReplayInput> serializedInput = buildInspectorObjectForInput(*input, index))
</span><del>- m_inputs->addItem(serializedInput.release());
</del><ins>+ m_inputs->addItem(WTF::move(serializedInput));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- ReturnType returnValue() { return m_inputs.release(); }
</del><ins>+ ReturnType returnValue() { return WTF::move(m_inputs); }
</ins><span class="cx"> private:
</span><span class="cx"> RefPtr<Inspector::Protocol::Array<Inspector::Protocol::Replay::ReplayInput>> m_inputs;
</span><span class="cx"> };
</span><span class="lines">@@ -214,10 +214,8 @@
</span><span class="cx"> m_page.replayController().willDispatchEvent(event, frame);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::sessionCreated(PassRefPtr<ReplaySession> prpSession)
</del><ins>+void InspectorReplayAgent::sessionCreated(RefPtr<ReplaySession>&& session)
</ins><span class="cx"> {
</span><del>- RefPtr<ReplaySession> session = prpSession;
-
</del><span class="cx"> auto result = m_sessionsMap.add(session->identifier(), session);
</span><span class="cx"> // Can't have two sessions with same identifier.
</span><span class="cx"> ASSERT_UNUSED(result, result.isNewEntry);
</span><span class="lines">@@ -225,25 +223,21 @@
</span><span class="cx"> m_frontendDispatcher->sessionCreated(session->identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::sessionModified(PassRefPtr<ReplaySession> session)
</del><ins>+void InspectorReplayAgent::sessionModified(RefPtr<ReplaySession>&& session)
</ins><span class="cx"> {
</span><span class="cx"> m_frontendDispatcher->sessionModified(session->identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::sessionLoaded(PassRefPtr<ReplaySession> prpSession)
</del><ins>+void InspectorReplayAgent::sessionLoaded(RefPtr<ReplaySession>&& session)
</ins><span class="cx"> {
</span><del>- RefPtr<ReplaySession> session = prpSession;
-
</del><span class="cx"> // In case we didn't know about the loaded session, add here.
</span><span class="cx"> m_sessionsMap.add(session->identifier(), session);
</span><span class="cx">
</span><span class="cx"> m_frontendDispatcher->sessionLoaded(session->identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::segmentCreated(PassRefPtr<ReplaySessionSegment> prpSegment)
</del><ins>+void InspectorReplayAgent::segmentCreated(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- RefPtr<ReplaySessionSegment> segment = prpSegment;
-
</del><span class="cx"> auto result = m_segmentsMap.add(segment->identifier(), segment);
</span><span class="cx"> // Can't have two segments with the same identifier.
</span><span class="cx"> ASSERT_UNUSED(result, result.isNewEntry);
</span><span class="lines">@@ -251,17 +245,15 @@
</span><span class="cx"> m_frontendDispatcher->segmentCreated(segment->identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::segmentCompleted(PassRefPtr<ReplaySessionSegment> segment)
</del><ins>+void InspectorReplayAgent::segmentCompleted(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><span class="cx"> m_frontendDispatcher->segmentCompleted(segment->identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorReplayAgent::segmentLoaded(PassRefPtr<ReplaySessionSegment> prpSegment)
</del><ins>+void InspectorReplayAgent::segmentLoaded(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- RefPtr<ReplaySessionSegment> segment = prpSegment;
-
</del><span class="cx"> // In case we didn't know about the loaded segment, add here.
</span><del>- m_segmentsMap.add(segment->identifier(), segment);
</del><ins>+ m_segmentsMap.add(segment->identifier(), segment.copyRef());
</ins><span class="cx">
</span><span class="cx"> m_frontendDispatcher->segmentLoaded(segment->identifier());
</span><span class="cx"> }
</span><span class="lines">@@ -384,7 +376,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorReplayAgent::switchSession(ErrorString& errorString, Inspector::Protocol::Replay::SessionIdentifier identifier)
</span><span class="cx"> {
</span><del>- ASSERT(identifier > 0);
</del><ins>+ ASSERT_ARG(identifier, identifier > 0);
</ins><span class="cx">
</span><span class="cx"> if (sessionState() != WebCore::SessionState::Inactive) {
</span><span class="cx"> errorString = ASCIILiteral("Can't switch sessions unless the session is neither capturing or replaying.");
</span><span class="lines">@@ -395,14 +387,14 @@
</span><span class="cx"> if (!session)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_page.replayController().switchSession(session);
</del><ins>+ m_page.replayController().switchSession(WTF::move(session));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorReplayAgent::insertSessionSegment(ErrorString& errorString, Inspector::Protocol::Replay::SessionIdentifier sessionIdentifier, SegmentIdentifier segmentIdentifier, int segmentIndex)
</span><span class="cx"> {
</span><del>- ASSERT(sessionIdentifier > 0);
- ASSERT(segmentIdentifier > 0);
- ASSERT(segmentIndex >= 0);
</del><ins>+ ASSERT_ARG(sessionIdentifier, sessionIdentifier > 0);
+ ASSERT_ARG(segmentIdentifier, segmentIdentifier > 0);
+ ASSERT_ARG(segmentIndex, segmentIndex >= 0);
</ins><span class="cx">
</span><span class="cx"> RefPtr<ReplaySession> session = findSession(errorString, sessionIdentifier);
</span><span class="cx"> RefPtr<ReplaySessionSegment> segment = findSegment(errorString, segmentIdentifier);
</span><span class="lines">@@ -420,14 +412,14 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- session->insertSegment(segmentIndex, segment);
- sessionModified(session);
</del><ins>+ session->insertSegment(segmentIndex, WTF::move(segment));
+ sessionModified(WTF::move(session));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorReplayAgent::removeSessionSegment(ErrorString& errorString, Inspector::Protocol::Replay::SessionIdentifier identifier, int segmentIndex)
</span><span class="cx"> {
</span><del>- ASSERT(identifier > 0);
- ASSERT(segmentIndex >= 0);
</del><ins>+ ASSERT_ARG(identifier, identifier > 0);
+ ASSERT_ARG(segmentIndex, segmentIndex >= 0);
</ins><span class="cx">
</span><span class="cx"> RefPtr<ReplaySession> session = findSession(errorString, identifier);
</span><span class="cx">
</span><span class="lines">@@ -445,12 +437,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> session->removeSegment(segmentIndex);
</span><del>- sessionModified(session);
</del><ins>+ sessionModified(WTF::move(session));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySession> InspectorReplayAgent::findSession(ErrorString& errorString, SessionIdentifier identifier)
</del><ins>+RefPtr<ReplaySession> InspectorReplayAgent::findSession(ErrorString& errorString, SessionIdentifier identifier)
</ins><span class="cx"> {
</span><del>- ASSERT(identifier > 0);
</del><ins>+ ASSERT_ARG(identifier, identifier > 0);
</ins><span class="cx">
</span><span class="cx"> auto it = m_sessionsMap.find(identifier);
</span><span class="cx"> if (it == m_sessionsMap.end()) {
</span><span class="lines">@@ -461,9 +453,9 @@
</span><span class="cx"> return it->value;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySessionSegment> InspectorReplayAgent::findSegment(ErrorString& errorString, SegmentIdentifier identifier)
</del><ins>+RefPtr<ReplaySessionSegment> InspectorReplayAgent::findSegment(ErrorString& errorString, SegmentIdentifier identifier)
</ins><span class="cx"> {
</span><del>- ASSERT(identifier > 0);
</del><ins>+ ASSERT_ARG(identifier, identifier > 0);
</ins><span class="cx">
</span><span class="cx"> auto it = m_segmentsMap.find(identifier);
</span><span class="cx"> if (it == m_segmentsMap.end()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorReplayAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorReplayAgent.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorReplayAgent.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/inspector/InspectorReplayAgent.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -73,14 +73,14 @@
</span><span class="cx"> void willDispatchEvent(const Event&, Frame*);
</span><span class="cx">
</span><span class="cx"> // Notifications from ReplayController.
</span><del>- void sessionCreated(PassRefPtr<ReplaySession>);
</del><ins>+ void sessionCreated(RefPtr<ReplaySession>&&);
</ins><span class="cx"> // This is called internally (when adding/removing) and by ReplayController during capture.
</span><del>- void sessionModified(PassRefPtr<ReplaySession>);
- void sessionLoaded(PassRefPtr<ReplaySession>);
</del><ins>+ void sessionModified(RefPtr<ReplaySession>&&);
+ void sessionLoaded(RefPtr<ReplaySession>&&);
</ins><span class="cx">
</span><del>- void segmentCreated(PassRefPtr<ReplaySessionSegment>);
- void segmentCompleted(PassRefPtr<ReplaySessionSegment>);
- void segmentLoaded(PassRefPtr<ReplaySessionSegment>);
</del><ins>+ void segmentCreated(RefPtr<ReplaySessionSegment>&&);
+ void segmentCompleted(RefPtr<ReplaySessionSegment>&&);
+ void segmentLoaded(RefPtr<ReplaySessionSegment>&&);
</ins><span class="cx"> void segmentUnloaded();
</span><span class="cx">
</span><span class="cx"> void captureStarted();
</span><span class="lines">@@ -110,8 +110,8 @@
</span><span class="cx"> virtual void getSegmentData(ErrorString&, Inspector::Protocol::Replay::SegmentIdentifier, RefPtr<Inspector::Protocol::Replay::SessionSegment>&) override;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- PassRefPtr<ReplaySession> findSession(ErrorString&, SessionIdentifier);
- PassRefPtr<ReplaySessionSegment> findSegment(ErrorString&, SegmentIdentifier);
</del><ins>+ RefPtr<ReplaySession> findSession(ErrorString&, SessionIdentifier);
+ RefPtr<ReplaySessionSegment> findSegment(ErrorString&, SegmentIdentifier);
</ins><span class="cx"> WebCore::SessionState sessionState() const;
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<Inspector::InspectorReplayFrontendDispatcher> m_frontendDispatcher;
</span></span></pre></div>
<a id="trunkSourceWebCorereplayCapturingInputCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/CapturingInputCursor.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/CapturingInputCursor.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/CapturingInputCursor.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -38,8 +38,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-CapturingInputCursor::CapturingInputCursor(PassRefPtr<ReplaySessionSegment> segment)
- : m_segment(segment)
</del><ins>+CapturingInputCursor::CapturingInputCursor(RefPtr<ReplaySessionSegment>&& segment)
+ : m_segment(WTF::move(segment))
</ins><span class="cx"> {
</span><span class="cx"> LOG(WebReplay, "%-30sCreated capture cursor=%p.\n", "[ReplayController]", this);
</span><span class="cx"> }
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx"> LOG(WebReplay, "%-30sDestroyed capture cursor=%p.\n", "[ReplayController]", this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<CapturingInputCursor> CapturingInputCursor::create(PassRefPtr<ReplaySessionSegment> segment)
</del><ins>+Ref<CapturingInputCursor> CapturingInputCursor::create(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CapturingInputCursor(segment));
</del><ins>+ return adoptRef(*new CapturingInputCursor(WTF::move(segment)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CapturingInputCursor::storeInput(std::unique_ptr<NondeterministicInputBase> input)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> m_segment->storage().store(WTF::move(input));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-NondeterministicInputBase* CapturingInputCursor::loadInput(InputQueue, const AtomicString&)
</del><ins>+NondeterministicInputBase* CapturingInputCursor::loadInput(InputQueue, const String&)
</ins><span class="cx"> {
</span><span class="cx"> // Can't load inputs from capturing cursor.
</span><span class="cx"> ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorereplayCapturingInputCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/CapturingInputCursor.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/CapturingInputCursor.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/CapturingInputCursor.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx">
</span><span class="cx"> #include <replay/InputCursor.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -42,17 +43,17 @@
</span><span class="cx"> class CapturingInputCursor final : public InputCursor {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(CapturingInputCursor);
</span><span class="cx"> public:
</span><del>- static Ref<CapturingInputCursor> create(PassRefPtr<ReplaySessionSegment>);
</del><ins>+ static Ref<CapturingInputCursor> create(RefPtr<ReplaySessionSegment>&&);
</ins><span class="cx"> virtual ~CapturingInputCursor();
</span><span class="cx">
</span><span class="cx"> virtual bool isCapturing() const override { return true; }
</span><span class="cx"> virtual bool isReplaying() const override { return false; }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- virtual NondeterministicInputBase* loadInput(InputQueue, const AtomicString& type) override;
</del><ins>+ virtual NondeterministicInputBase* loadInput(InputQueue, const String& type) override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- CapturingInputCursor(PassRefPtr<ReplaySessionSegment>);
</del><ins>+ CapturingInputCursor(RefPtr<ReplaySessionSegment>&&);
</ins><span class="cx">
</span><span class="cx"> virtual NondeterministicInputBase* uncheckedLoadInput(InputQueue) override;
</span><span class="cx"> virtual void storeInput(std::unique_ptr<NondeterministicInputBase>) override;
</span></span></pre></div>
<a id="trunkSourceWebCorereplayEventLoopInputDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -49,11 +49,7 @@
</span><span class="cx"> , m_client(client)
</span><span class="cx"> , m_cursor(cursor)
</span><span class="cx"> , m_timer(*this, &EventLoopInputDispatcher::timerFired)
</span><del>- , m_dispatching(false)
- , m_running(false)
</del><span class="cx"> , m_speed(DispatchSpeed::FastForward)
</span><del>- , m_previousDispatchStartTime(0.0)
- , m_previousInputTimestamp(0.0)
</del><span class="cx"> {
</span><span class="cx"> m_currentWork.input = nullptr;
</span><span class="cx"> m_currentWork.timestamp = 0.0;
</span></span></pre></div>
<a id="trunkSourceWebCorereplayEventLoopInputDispatcherh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/EventLoopInputDispatcher.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/EventLoopInputDispatcher.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/EventLoopInputDispatcher.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -82,15 +82,15 @@
</span><span class="cx"> // This data is valid when an event loop input is presently dispatching.
</span><span class="cx"> EventLoopInputData m_currentWork;
</span><span class="cx"> // Whether the dispatcher is currently calling out to an inputs' dispatch() method.
</span><del>- bool m_dispatching;
</del><ins>+ bool m_dispatching {false};
</ins><span class="cx"> // Whether the dispatcher is waiting to dispatch or actively dispatching inputs.
</span><del>- bool m_running;
</del><ins>+ bool m_running {false};
</ins><span class="cx">
</span><span class="cx"> DispatchSpeed m_speed;
</span><span class="cx"> // The time at which the last input dispatch() method was called.
</span><del>- double m_previousDispatchStartTime;
</del><ins>+ double m_previousDispatchStartTime {0.0};
</ins><span class="cx"> // The timestamp specified by the last dispatched input.
</span><del>- double m_previousInputTimestamp;
</del><ins>+ double m_previousInputTimestamp {0.0};
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorereplayFunctorInputCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/FunctorInputCursor.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/FunctorInputCursor.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/FunctorInputCursor.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> class FunctorInputCursor final : public InputCursor {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(FunctorInputCursor);
</span><span class="cx"> public:
</span><del>- static PassRefPtr<FunctorInputCursor> create(PassRefPtr<ReplaySessionSegment> segment)
</del><ins>+ static Ref<FunctorInputCursor> create(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- return adoptRef(new FunctorInputCursor(segment));
</del><ins>+ return adoptRef(*new FunctorInputCursor(WTF::move(segment)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // InputCursor
</span><span class="lines">@@ -58,9 +58,9 @@
</span><span class="cx"> template<typename Functor>
</span><span class="cx"> typename Functor::ReturnType forEachInputInQueue(InputQueue, Functor&);
</span><span class="cx"> protected:
</span><del>- virtual NondeterministicInputBase* loadInput(InputQueue, const AtomicString&) override;
</del><ins>+ virtual NondeterministicInputBase* loadInput(InputQueue, const String&) override;
</ins><span class="cx"> private:
</span><del>- FunctorInputCursor(PassRefPtr<ReplaySessionSegment>);
</del><ins>+ FunctorInputCursor(RefPtr<ReplaySessionSegment>&&);
</ins><span class="cx">
</span><span class="cx"> RefPtr<ReplaySessionSegment> m_segment;
</span><span class="cx"> };
</span><span class="lines">@@ -74,8 +74,8 @@
</span><span class="cx"> return functor.returnValue();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline FunctorInputCursor::FunctorInputCursor(PassRefPtr<ReplaySessionSegment> segment)
- : m_segment(segment)
</del><ins>+inline FunctorInputCursor::FunctorInputCursor(RefPtr<ReplaySessionSegment>&& segment)
+ : m_segment(WTF::move(segment))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline NondeterministicInputBase* FunctorInputCursor::loadInput(InputQueue, const AtomicString&)
</del><ins>+inline NondeterministicInputBase* FunctorInputCursor::loadInput(InputQueue, const String&)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayController.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayController.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplayController.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -113,10 +113,8 @@
</span><span class="cx">
</span><span class="cx"> ReplayController::ReplayController(Page& page)
</span><span class="cx"> : m_page(page)
</span><del>- , m_loadedSegment(nullptr)
</del><span class="cx"> , m_loadedSession(ReplaySession::create())
</span><span class="cx"> , m_emptyCursor(EmptyInputCursor::create())
</span><del>- , m_activeCursor(nullptr)
</del><span class="cx"> , m_targetPosition(ReplayPosition(0, 0))
</span><span class="cx"> , m_currentPosition(ReplayPosition(0, 0))
</span><span class="cx"> , m_segmentState(SegmentState::Unloaded)
</span><span class="lines">@@ -127,7 +125,7 @@
</span><span class="cx">
</span><span class="cx"> void ReplayController::setForceDeterministicSettings(bool shouldForceDeterministicBehavior)
</span><span class="cx"> {
</span><del>- ASSERT(shouldForceDeterministicBehavior ^ (m_sessionState == SessionState::Inactive));
</del><ins>+ ASSERT_ARG(shouldForceDeterministicBehavior, shouldForceDeterministicBehavior ^ (m_sessionState == SessionState::Inactive));
</ins><span class="cx">
</span><span class="cx"> if (shouldForceDeterministicBehavior) {
</span><span class="cx"> m_savedSettings.usesPageCache = m_page.settings().usesPageCache();
</span><span class="lines">@@ -145,7 +143,7 @@
</span><span class="cx">
</span><span class="cx"> void ReplayController::setSessionState(SessionState state)
</span><span class="cx"> {
</span><del>- ASSERT(state != m_sessionState);
</del><ins>+ ASSERT_ARG(state, state != m_sessionState);
</ins><span class="cx">
</span><span class="cx"> LOG(WebReplay, "%-20s SessionState transition: %10s --> %10s.\n", "ReplayController", sessionStateToString(m_sessionState), sessionStateToString(state));
</span><span class="cx">
</span><span class="lines">@@ -173,7 +171,7 @@
</span><span class="cx">
</span><span class="cx"> void ReplayController::setSegmentState(SegmentState state)
</span><span class="cx"> {
</span><del>- ASSERT(state != m_segmentState);
</del><ins>+ ASSERT_ARG(state, state != m_segmentState);
</ins><span class="cx">
</span><span class="cx"> LOG(WebReplay, "%-20s SegmentState transition: %10s --> %10s.\n", "ReplayController", segmentStateToString(m_segmentState), segmentStateToString(state));
</span><span class="cx">
</span><span class="lines">@@ -198,8 +196,9 @@
</span><span class="cx"> m_segmentState = state;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ReplayController::switchSession(PassRefPtr<ReplaySession> session)
</del><ins>+void ReplayController::switchSession(RefPtr<ReplaySession>&& session)
</ins><span class="cx"> {
</span><ins>+ ASSERT_ARG(session, session);
</ins><span class="cx"> ASSERT(m_segmentState == SegmentState::Unloaded);
</span><span class="cx"> ASSERT(m_sessionState == SessionState::Inactive);
</span><span class="cx">
</span><span class="lines">@@ -225,7 +224,7 @@
</span><span class="cx"> LOG(WebReplay, "%-20s Created segment: %p.\n", "ReplayController", m_loadedSegment.get());
</span><span class="cx"> InspectorInstrumentation::segmentCreated(m_page, m_loadedSegment.copyRef());
</span><span class="cx">
</span><del>- m_activeCursor = CapturingInputCursor::create(m_loadedSegment);
</del><ins>+ m_activeCursor = CapturingInputCursor::create(m_loadedSegment.copyRef());
</ins><span class="cx"> m_activeCursor->appendInput<BeginSegmentSentinel>();
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<InitialNavigation> navigationInput = InitialNavigation::createFromPage(m_page);
</span><span class="lines">@@ -249,13 +248,13 @@
</span><span class="cx"> LOG(WebReplay, "%-20s Completed segment: %p.\n", "ReplayController", segment.get());
</span><span class="cx"> InspectorInstrumentation::segmentCompleted(m_page, segment.copyRef());
</span><span class="cx">
</span><del>- m_loadedSession->appendSegment(segment);
</del><ins>+ m_loadedSession->appendSegment(segment.copyRef());
</ins><span class="cx"> InspectorInstrumentation::sessionModified(m_page, m_loadedSession.copyRef());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ReplayController::loadSegmentAtIndex(size_t segmentIndex)
</span><span class="cx"> {
</span><del>- ASSERT(segmentIndex < m_loadedSession->size());
</del><ins>+ ASSERT_ARG(segmentIndex, segmentIndex >= 0 && segmentIndex < m_loadedSession->size());
</ins><span class="cx"> RefPtr<ReplaySessionSegment> segment = m_loadedSession->at(segmentIndex);
</span><span class="cx">
</span><span class="cx"> ASSERT(m_sessionState == SessionState::Replaying);
</span><span class="lines">@@ -269,7 +268,7 @@
</span><span class="cx"> m_currentPosition.segmentOffset = segmentIndex;
</span><span class="cx"> m_currentPosition.inputOffset = 0;
</span><span class="cx">
</span><del>- m_activeCursor = ReplayingInputCursor::create(m_loadedSegment, m_page, this);
</del><ins>+ m_activeCursor = ReplayingInputCursor::create(m_loadedSegment.copyRef(), m_page, this);
</ins><span class="cx">
</span><span class="cx"> LOG(WebReplay, "%-20sLoading segment: %p.\n", "ReplayController", segment.get());
</span><span class="cx"> InspectorInstrumentation::segmentLoaded(m_page, segment.copyRef());
</span><span class="lines">@@ -287,8 +286,8 @@
</span><span class="cx"> m_activeCursor = nullptr;
</span><span class="cx"> RefPtr<ReplaySessionSegment> unloadedSegment = m_loadedSegment.release();
</span><span class="cx"> for (Frame* frame = &m_page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
</span><del>- frame->script().globalObject(mainThreadNormalWorld())->setInputCursor(m_emptyCursor);
- frame->document()->setInputCursor(m_emptyCursor);
</del><ins>+ frame->script().globalObject(mainThreadNormalWorld())->setInputCursor(m_emptyCursor.copyRef());
+ frame->document()->setInputCursor(m_emptyCursor.copyRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // When we stop capturing, don't send out segment unloaded events since we
</span><span class="lines">@@ -407,7 +406,8 @@
</span><span class="cx"> void ReplayController::frameNavigated(DocumentLoader* loader)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_sessionState != SessionState::Inactive);
</span><del>-
</del><ins>+ ASSERT_ARG(loader, loader);
+
</ins><span class="cx"> // The initial capturing segment is created prior to main frame navigation.
</span><span class="cx"> // Otherwise, the prior capturing segment was completed when the frame detached,
</span><span class="cx"> // and it is now time to create a new segment.
</span><span class="lines">@@ -478,27 +478,26 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySession> ReplayController::loadedSession() const
</del><ins>+RefPtr<ReplaySession> ReplayController::loadedSession() const
</ins><span class="cx"> {
</span><del>- return m_loadedSession;
</del><ins>+ return m_loadedSession.copyRef();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySessionSegment> ReplayController::loadedSegment() const
</del><ins>+RefPtr<ReplaySessionSegment> ReplayController::loadedSegment() const
</ins><span class="cx"> {
</span><del>- return m_loadedSegment;
</del><ins>+ return m_loadedSegment.copyRef();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-InputCursor& ReplayController::activeInputCursor() const
</del><ins>+InputCursor& ReplayController::activeInputCursor()
</ins><span class="cx"> {
</span><del>- return m_activeCursor ? *m_activeCursor : *m_emptyCursor;
</del><ins>+ return m_activeCursor ? *m_activeCursor : m_emptyCursor.get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EventLoopInputDispatcher& ReplayController::dispatcher() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_sessionState == SessionState::Replaying);
</span><span class="cx"> ASSERT(m_segmentState == SegmentState::Dispatching);
</span><del>- ASSERT(m_activeCursor);
- ASSERT(m_activeCursor->isReplaying());
</del><ins>+ ASSERT(m_activeCursor && m_activeCursor->isReplaying());
</ins><span class="cx">
</span><span class="cx"> return static_cast<ReplayingInputCursor&>(*m_activeCursor).dispatcher();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayController.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayController.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplayController.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> replayToPosition(ReplayPosition(), speed);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void switchSession(PassRefPtr<ReplaySession>);
</del><ins>+ void switchSession(RefPtr<ReplaySession>&&);
</ins><span class="cx">
</span><span class="cx"> // InspectorReplayAgent notifications.
</span><span class="cx"> void frameNavigated(DocumentLoader*);
</span><span class="lines">@@ -140,10 +140,10 @@
</span><span class="cx"> SessionState sessionState() const { return m_sessionState; }
</span><span class="cx"> SegmentState segmentState() const { return m_segmentState; }
</span><span class="cx">
</span><del>- PassRefPtr<ReplaySession> loadedSession() const;
- PassRefPtr<ReplaySessionSegment> loadedSegment() const;
</del><ins>+ RefPtr<ReplaySession> loadedSession() const;
+ RefPtr<ReplaySessionSegment> loadedSegment() const;
</ins><span class="cx">
</span><del>- JSC::InputCursor& activeInputCursor() const;
</del><ins>+ JSC::InputCursor& activeInputCursor();
</ins><span class="cx"> ReplayPosition currentPosition() const { return m_currentPosition; }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<ReplaySessionSegment> m_loadedSegment;
</span><span class="cx"> RefPtr<ReplaySession> m_loadedSession;
</span><del>- const RefPtr<JSC::InputCursor> m_emptyCursor;
</del><ins>+ Ref<JSC::InputCursor> m_emptyCursor;
</ins><span class="cx"> // The active cursor is set to nullptr when invalid.
</span><span class="cx"> RefPtr<JSC::InputCursor> m_activeCursor;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplaySessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplaySession.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplaySession.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplaySession.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -37,9 +37,9 @@
</span><span class="cx">
</span><span class="cx"> static unsigned s_nextIdentifier = 1;
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySession> ReplaySession::create()
</del><ins>+Ref<ReplaySession> ReplaySession::create()
</ins><span class="cx"> {
</span><del>- return adoptRef(new ReplaySession());
</del><ins>+ return adoptRef(*new ReplaySession());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ReplaySession::ReplaySession()
</span><span class="lines">@@ -52,35 +52,39 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySessionSegment> ReplaySession::at(size_t position) const
</del><ins>+RefPtr<ReplaySessionSegment> ReplaySession::at(size_t position) const
</ins><span class="cx"> {
</span><del>- return m_segments.at(position);
</del><ins>+ ASSERT_ARG(position, position >= 0 && position < m_segments.size());
+
+ return m_segments.at(position).copyRef();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void ReplaySession::appendSegment(PassRefPtr<ReplaySessionSegment> prpSegment)
</del><ins>+void ReplaySession::appendSegment(RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- RefPtr<ReplaySessionSegment> segment = prpSegment;
-
</del><ins>+ ASSERT_ARG(segment, segment);
</ins><span class="cx"> // For now, only support one segment.
</span><span class="cx"> ASSERT(!m_segments.size());
</span><span class="cx">
</span><span class="cx"> // Since replay locations are specified with segment IDs, we can only
</span><span class="cx"> // have one instance of a segment in the session.
</span><del>- size_t offset = m_segments.find(segment);
</del><ins>+ size_t offset = m_segments.find(segment.copyRef());
</ins><span class="cx"> ASSERT_UNUSED(offset, offset == notFound);
</span><span class="cx">
</span><del>- m_segments.append(segment.release());
</del><ins>+ m_segments.append(WTF::move(segment));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void ReplaySession::insertSegment(size_t position, PassRefPtr<ReplaySessionSegment> segment)
</del><ins>+void ReplaySession::insertSegment(size_t position, RefPtr<ReplaySessionSegment>&& segment)
</ins><span class="cx"> {
</span><del>- ASSERT(position < m_segments.size());
- m_segments.insert(position, segment);
</del><ins>+ ASSERT_ARG(segment, segment);
+ ASSERT_ARG(position, position >= 0 && position < m_segments.size());
+
+ m_segments.insert(position, WTF::move(segment));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ReplaySession::removeSegment(size_t position)
</span><span class="cx"> {
</span><del>- ASSERT(position < m_segments.size());
</del><ins>+ ASSERT_ARG(position, position >= 0 && position < m_segments.size());
+
</ins><span class="cx"> m_segments.remove(position);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplaySessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplaySession.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplaySession.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplaySession.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -43,20 +43,20 @@
</span><span class="cx"> class ReplaySession : public RefCounted<ReplaySession> {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(ReplaySession);
</span><span class="cx"> public:
</span><del>- static PassRefPtr<ReplaySession> create();
</del><ins>+ static Ref<ReplaySession> create();
</ins><span class="cx"> ~ReplaySession();
</span><span class="cx">
</span><span class="cx"> double timestamp() const { return m_timestamp; }
</span><span class="cx"> unsigned identifier() const { return m_identifier; }
</span><span class="cx">
</span><span class="cx"> size_t size() const { return m_segments.size(); }
</span><del>- PassRefPtr<ReplaySessionSegment> at(size_t position) const;
</del><ins>+ RefPtr<ReplaySessionSegment> at(size_t position) const;
</ins><span class="cx">
</span><span class="cx"> SegmentIterator begin() const { return m_segments.begin(); }
</span><span class="cx"> SegmentIterator end() const { return m_segments.end(); }
</span><span class="cx">
</span><del>- void appendSegment(PassRefPtr<ReplaySessionSegment>);
- void insertSegment(size_t position, PassRefPtr<ReplaySessionSegment>);
</del><ins>+ void appendSegment(RefPtr<ReplaySessionSegment>&&);
+ void insertSegment(size_t position, RefPtr<ReplaySessionSegment>&&);
</ins><span class="cx"> void removeSegment(size_t position);
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplaySessionSegmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplaySessionSegment.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplaySessionSegment.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplaySessionSegment.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -35,22 +35,20 @@
</span><span class="cx"> #include "ReplayingInputCursor.h"
</span><span class="cx"> #include "SegmentedInputStorage.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static unsigned s_nextSegmentIdentifier = 1;
</span><span class="cx">
</span><del>-PassRefPtr<ReplaySessionSegment> ReplaySessionSegment::create()
</del><ins>+Ref<ReplaySessionSegment> ReplaySessionSegment::create()
</ins><span class="cx"> {
</span><del>- return adoptRef(new ReplaySessionSegment);
</del><ins>+ return adoptRef(*new ReplaySessionSegment);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ReplaySessionSegment::ReplaySessionSegment()
</span><span class="cx"> : m_storage(std::make_unique<SegmentedInputStorage>())
</span><span class="cx"> , m_identifier(s_nextSegmentIdentifier++)
</span><del>- , m_canCapture(true)
</del><span class="cx"> , m_timestamp(currentTimeMS())
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplaySessionSegmenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplaySessionSegment.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplaySessionSegment.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplaySessionSegment.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> friend class FunctorInputCursor;
</span><span class="cx"> friend class ReplayingInputCursor;
</span><span class="cx"> public:
</span><del>- static PassRefPtr<ReplaySessionSegment> create();
</del><ins>+ static Ref<ReplaySessionSegment> create();
</ins><span class="cx"> ~ReplaySessionSegment();
</span><span class="cx">
</span><span class="cx"> unsigned identifier() const { return m_identifier; }
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> Vector<double, 0> m_eventLoopTimings;
</span><span class="cx">
</span><span class="cx"> unsigned m_identifier;
</span><del>- bool m_canCapture;
</del><ins>+ bool m_canCapture {true};
</ins><span class="cx"> double m_timestamp;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayingInputCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayingInputCursor.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayingInputCursor.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplayingInputCursor.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-ReplayingInputCursor::ReplayingInputCursor(PassRefPtr<ReplaySessionSegment> segment, Page& page, EventLoopInputDispatcherClient* client)
- : m_segment(segment)
</del><ins>+ReplayingInputCursor::ReplayingInputCursor(RefPtr<ReplaySessionSegment>&& segment, Page& page, EventLoopInputDispatcherClient* client)
+ : m_segment(WTF::move(segment))
</ins><span class="cx"> , m_dispatcher(std::make_unique<EventLoopInputDispatcher>(page, *this, client))
</span><span class="cx"> {
</span><span class="cx"> for (size_t i = 0; i < static_cast<size_t>(InputQueue::Count); i++)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ReplayingInputCursor> ReplayingInputCursor::create(PassRefPtr<ReplaySessionSegment> segment, Page& page, EventLoopInputDispatcherClient* client)
</del><ins>+Ref<ReplayingInputCursor> ReplayingInputCursor::create(RefPtr<ReplaySessionSegment>&& segment, Page& page, EventLoopInputDispatcherClient* client)
</ins><span class="cx"> {
</span><del>- return adoptRef(new ReplayingInputCursor(segment, page, client));
</del><ins>+ return adoptRef(*new ReplayingInputCursor(WTF::move(segment), page, client));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ReplayingInputCursor::storeInput(std::unique_ptr<NondeterministicInputBase>)
</span><span class="lines">@@ -62,12 +62,12 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-NondeterministicInputBase* ReplayingInputCursor::loadInput(InputQueue queue, const AtomicString& type)
</del><ins>+NondeterministicInputBase* ReplayingInputCursor::loadInput(InputQueue queue, const String& type)
</ins><span class="cx"> {
</span><span class="cx"> NondeterministicInputBase* input = uncheckedLoadInput(queue);
</span><span class="cx">
</span><span class="cx"> if (input->type() != type) {
</span><del>- LOG_ERROR("%-25s ERROR: Expected replay input of type %s, but got type %s\n", "[ReplayingInputCursor]", type.string().ascii().data(), input->type().ascii().data());
</del><ins>+ LOG_ERROR("%-25s ERROR: Expected replay input of type %s, but got type %s\n", "[ReplayingInputCursor]", type.ascii().data(), input->type().ascii().data());
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayingInputCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayingInputCursor.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayingInputCursor.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/ReplayingInputCursor.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx">
</span><span class="cx"> #include <replay/InputCursor.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><del>-#include <wtf/text/AtomicString.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -50,7 +49,7 @@
</span><span class="cx"> class ReplayingInputCursor final : public InputCursor {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(ReplayingInputCursor);
</span><span class="cx"> public:
</span><del>- static PassRefPtr<ReplayingInputCursor> create(PassRefPtr<ReplaySessionSegment>, Page&, EventLoopInputDispatcherClient*);
</del><ins>+ static Ref<ReplayingInputCursor> create(RefPtr<ReplaySessionSegment>&&, Page&, EventLoopInputDispatcherClient*);
</ins><span class="cx"> virtual ~ReplayingInputCursor();
</span><span class="cx">
</span><span class="cx"> virtual bool isCapturing() const override { return false; }
</span><span class="lines">@@ -60,9 +59,9 @@
</span><span class="cx">
</span><span class="cx"> EventLoopInputData loadEventLoopInput();
</span><span class="cx"> protected:
</span><del>- virtual NondeterministicInputBase* loadInput(InputQueue, const AtomicString& type) override;
</del><ins>+ virtual NondeterministicInputBase* loadInput(InputQueue, const String& type) override;
</ins><span class="cx"> private:
</span><del>- ReplayingInputCursor(PassRefPtr<ReplaySessionSegment>, Page&, EventLoopInputDispatcherClient*);
</del><ins>+ ReplayingInputCursor(RefPtr<ReplaySessionSegment>&&, Page&, EventLoopInputDispatcherClient*);
</ins><span class="cx">
</span><span class="cx"> virtual void storeInput(std::unique_ptr<NondeterministicInputBase>) override;
</span><span class="cx"> virtual NondeterministicInputBase* uncheckedLoadInput(InputQueue) override;
</span></span></pre></div>
<a id="trunkSourceWebCorereplaySegmentedInputStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/SegmentedInputStorage.cpp (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/SegmentedInputStorage.cpp        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/SegmentedInputStorage.cpp        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -74,7 +74,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SegmentedInputStorage::SegmentedInputStorage()
</span><del>- : m_inputCount(0)
</del><span class="cx"> {
</span><span class="cx"> for (size_t i = 0; i < offsetForInputQueue(InputQueue::Count); i++)
</span><span class="cx"> m_queues.append(new QueuedInputs);
</span><span class="lines">@@ -100,8 +99,8 @@
</span><span class="cx">
</span><span class="cx"> void SegmentedInputStorage::store(std::unique_ptr<NondeterministicInputBase> input)
</span><span class="cx"> {
</span><del>- ASSERT(input);
- ASSERT(input->queue() < InputQueue::Count);
</del><ins>+ ASSERT_ARG(input, input);
+ ASSERT_ARG(input, input->queue() < InputQueue::Count);
</ins><span class="cx">
</span><span class="cx"> LOG(WebReplay, "%-14s#%-5u %s: %s %s\n", "ReplayEvents", m_inputCount++, queueTypeToLogPrefix(input->queue(), false), input->type().utf8().data(), jsonStringForInput(*input).utf8().data());
</span><span class="cx">
</span><span class="lines">@@ -115,7 +114,7 @@
</span><span class="cx">
</span><span class="cx"> const SegmentedInputStorage::QueuedInputs& SegmentedInputStorage::queue(InputQueue queue) const
</span><span class="cx"> {
</span><del>- ASSERT(queue < InputQueue::Count);
</del><ins>+ ASSERT_ARG(queue, queue < InputQueue::Count);
</ins><span class="cx"> return *m_queues.at(offsetForInputQueue(queue));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplaySegmentedInputStorageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/SegmentedInputStorage.h (178602 => 178603)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/SegmentedInputStorage.h        2015-01-16 22:05:56 UTC (rev 178602)
+++ trunk/Source/WebCore/replay/SegmentedInputStorage.h        2015-01-16 22:13:08 UTC (rev 178603)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> const QueuedInputs& queue(InputQueue) const;
</span><span class="cx">
</span><span class="cx"> Vector<QueuedInputs*, 3> m_queues;
</span><del>- unsigned m_inputCount;
</del><ins>+ unsigned m_inputCount {0};
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>
</body>
</html>