<!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>[198483] 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/198483">198483</a></dd>
<dt>Author</dt> <dd>gyuyoung.kim@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-20 23:05:49 -0700 (Sun, 20 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Reduce uses of PassRefPtr in WebCore/dom - 6
https://bugs.webkit.org/show_bug.cgi?id=155579
Reviewed by Darin Adler.
* dom/MessagePortChannel.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::EventData):
(WebCore::MessagePortChannel::createChannel):
(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::PlatformMessagePortChannel::create):
(WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::EventData::message):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentMarkercpp">trunk/Source/WebCore/dom/DocumentMarker.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentMarkerh">trunk/Source/WebCore/dom/DocumentMarker.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentMarkerControllercpp">trunk/Source/WebCore/dom/DocumentMarkerController.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentMarkerControllerh">trunk/Source/WebCore/dom/DocumentMarkerController.h</a></li>
<li><a href="#trunkSourceWebCoredomEventContextcpp">trunk/Source/WebCore/dom/EventContext.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventContexth">trunk/Source/WebCore/dom/EventContext.h</a></li>
<li><a href="#trunkSourceWebCoredomEventDispatchercpp">trunk/Source/WebCore/dom/EventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMessagePortcpp">trunk/Source/WebCore/dom/MessagePort.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMessagePorth">trunk/Source/WebCore/dom/MessagePort.h</a></li>
<li><a href="#trunkSourceWebCoredomMessagePortChannelh">trunk/Source/WebCore/dom/MessagePortChannel.h</a></li>
<li><a href="#trunkSourceWebCoredomStaticNodeListh">trunk/Source/WebCore/dom/StaticNodeList.h</a></li>
<li><a href="#trunkSourceWebCoredomdefaultPlatformMessagePortChannelcpp">trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp</a></li>
<li><a href="#trunkSourceWebCoredomdefaultPlatformMessagePortChannelh">trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/ChangeLog        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-03-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
+
+ Reduce uses of PassRefPtr in WebCore/dom - 6
+ https://bugs.webkit.org/show_bug.cgi?id=155579
+
+ Reviewed by Darin Adler.
+
+ * dom/MessagePortChannel.h:
+ * dom/default/PlatformMessagePortChannel.cpp:
+ (WebCore::PlatformMessagePortChannel::EventData::EventData):
+ (WebCore::MessagePortChannel::createChannel):
+ (WebCore::MessagePortChannel::MessagePortChannel):
+ (WebCore::MessagePortChannel::postMessageToRemote):
+ (WebCore::PlatformMessagePortChannel::create):
+ (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
+ * dom/default/PlatformMessagePortChannel.h:
+ (WebCore::PlatformMessagePortChannel::EventData::message):
+
</ins><span class="cx"> 2016-03-20 Jinwoo Jeong <jw00.jeong@samsung.com>
</span><span class="cx">
</span><span class="cx"> The setter of binaryType attribute in WebSocket should raise the exception.
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentMarker.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentMarker.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/DocumentMarker.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> ASSERT(m_details);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned endOffset, PassRefPtr<DocumentMarkerDetails> details)
</del><ins>+DocumentMarker::DocumentMarker(MarkerType type, unsigned startOffset, unsigned endOffset, RefPtr<DocumentMarkerDetails>&& details)
</ins><span class="cx"> : m_type(type)
</span><span class="cx"> , m_startOffset(startOffset)
</span><span class="cx"> , m_endOffset(endOffset)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentMarkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentMarker.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentMarker.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/DocumentMarker.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx"> DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset, const String& description, const Vector<String>& alternatives, RetainPtr<id> metadata);
</span><span class="cx"> #endif
</span><span class="cx"> DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch);
</span><del>- DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset, PassRefPtr<DocumentMarkerDetails>);
</del><ins>+ DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset, RefPtr<DocumentMarkerDetails>&&);
</ins><span class="cx">
</span><span class="cx"> MarkerType type() const { return m_type; }
</span><span class="cx"> unsigned startOffset() const { return m_startOffset; }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentMarkerControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -83,9 +83,9 @@
</span><span class="cx"> addMarker(node, DocumentMarker(type, startOffset, startOffset + length));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DocumentMarkerController::addMarkerToNode(Node* node, unsigned startOffset, unsigned length, DocumentMarker::MarkerType type, PassRefPtr<DocumentMarkerDetails> details)
</del><ins>+void DocumentMarkerController::addMarkerToNode(Node* node, unsigned startOffset, unsigned length, DocumentMarker::MarkerType type, RefPtr<DocumentMarkerDetails>&& details)
</ins><span class="cx"> {
</span><del>- addMarker(node, DocumentMarker(type, startOffset, startOffset + length, details));
</del><ins>+ addMarker(node, DocumentMarker(type, startOffset, startOffset + length, WTFMove(details)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentMarkerControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentMarkerController.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentMarkerController.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> void addMarker(Range*, DocumentMarker::MarkerType);
</span><span class="cx"> void addMarker(Range*, DocumentMarker::MarkerType, const String& description);
</span><span class="cx"> void addMarkerToNode(Node*, unsigned startOffset, unsigned length, DocumentMarker::MarkerType);
</span><del>- void addMarkerToNode(Node*, unsigned startOffset, unsigned length, DocumentMarker::MarkerType, PassRefPtr<DocumentMarkerDetails>);
</del><ins>+ void addMarkerToNode(Node*, unsigned startOffset, unsigned length, DocumentMarker::MarkerType, RefPtr<DocumentMarkerDetails>&&);
</ins><span class="cx"> WEBCORE_EXPORT void addTextMatchMarker(const Range*, bool activeMatch);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void addMarker(Range*, DocumentMarker::MarkerType, const String& description, const Vector<String>& interpretations, const RetainPtr<id>& metadata);
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventContext.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventContext.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/EventContext.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-EventContext::EventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target)
</del><ins>+EventContext::EventContext(Node* node, EventTarget* currentTarget, EventTarget* target)
</ins><span class="cx"> : m_node(node)
</span><span class="cx"> , m_currentTarget(currentTarget)
</span><span class="cx"> , m_target(target)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-MouseOrFocusEventContext::MouseOrFocusEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target)
</del><ins>+MouseOrFocusEventContext::MouseOrFocusEventContext(Node* node, EventTarget* currentTarget, EventTarget* target)
</ins><span class="cx"> : EventContext(node, currentTarget, target)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><del>-TouchEventContext::TouchEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target)
</del><ins>+TouchEventContext::TouchEventContext(Node* node, EventTarget* currentTarget, EventTarget* target)
</ins><span class="cx"> : EventContext(node, currentTarget, target)
</span><span class="cx"> , m_touches(TouchList::create())
</span><span class="cx"> , m_targetTouches(TouchList::create())
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventContext.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventContext.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/EventContext.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx"> // FIXME: Use ContainerNode instead of Node.
</span><del>- EventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target);
</del><ins>+ EventContext(Node*, EventTarget* currentTarget, EventTarget*);
</ins><span class="cx"> virtual ~EventContext();
</span><span class="cx">
</span><span class="cx"> Node* node() const { return m_node.get(); }
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">
</span><span class="cx"> class MouseOrFocusEventContext final : public EventContext {
</span><span class="cx"> public:
</span><del>- MouseOrFocusEventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target);
</del><ins>+ MouseOrFocusEventContext(Node*, EventTarget* currentTarget, EventTarget*);
</ins><span class="cx"> virtual ~MouseOrFocusEventContext();
</span><span class="cx"> EventTarget* relatedTarget() const { return m_relatedTarget.get(); }
</span><span class="cx"> void setRelatedTarget(PassRefPtr<EventTarget>);
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> class TouchEventContext final : public EventContext {
</span><span class="cx"> public:
</span><del>- TouchEventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget, PassRefPtr<EventTarget> target);
</del><ins>+ TouchEventContext(Node*, EventTarget* currentTarget, EventTarget*);
</ins><span class="cx"> virtual ~TouchEventContext();
</span><span class="cx">
</span><span class="cx"> void handleLocalEvents(Event&) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventDispatcher.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> class WindowEventContext {
</span><span class="cx"> public:
</span><del>- WindowEventContext(PassRefPtr<Node>, const EventContext*);
</del><ins>+ WindowEventContext(Node*, const EventContext*);
</ins><span class="cx">
</span><span class="cx"> DOMWindow* window() const { return m_window.get(); }
</span><span class="cx"> EventTarget* target() const { return m_target.get(); }
</span><span class="lines">@@ -52,14 +52,14 @@
</span><span class="cx"> RefPtr<EventTarget> m_target;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-WindowEventContext::WindowEventContext(PassRefPtr<Node> node, const EventContext* topEventContext)
</del><ins>+WindowEventContext::WindowEventContext(Node* node, const EventContext* topEventContext)
</ins><span class="cx"> {
</span><del>- Node* topLevelContainer = topEventContext ? topEventContext->node() : node.get();
</del><ins>+ Node* topLevelContainer = topEventContext ? topEventContext->node() : node;
</ins><span class="cx"> if (!is<Document>(*topLevelContainer))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_window = downcast<Document>(*topLevelContainer).domWindow();
</span><del>- m_target = topEventContext ? topEventContext->target() : node.get();
</del><ins>+ m_target = topEventContext ? topEventContext->target() : node;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WindowEventContext::handleLocalEvents(Event& event)
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePortcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePort.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePort.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/MessagePort.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -52,15 +52,15 @@
</span><span class="cx"> m_scriptExecutionContext->destroyedMessagePort(*this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MessagePort::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, ExceptionCode& ec)
</del><ins>+void MessagePort::postMessage(RefPtr<SerializedScriptValue>&& message, MessagePort* port, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> MessagePortArray ports;
</span><span class="cx"> if (port)
</span><span class="cx"> ports.append(port);
</span><del>- postMessage(message, &ports, ec);
</del><ins>+ postMessage(WTFMove(message), &ports, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void MessagePort::postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionCode& ec)
</del><ins>+void MessagePort::postMessage(RefPtr<SerializedScriptValue>&& message, const MessagePortArray* ports, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> if (!isEntangled())
</span><span class="cx"> return;
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- m_entangledChannel->postMessageToRemote(message, WTFMove(channels));
</del><ins>+ m_entangledChannel->postMessageToRemote(WTFMove(message), WTFMove(channels));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<MessagePortChannel> MessagePort::disentangle()
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePorth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePort.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePort.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/MessagePort.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include "MessagePortChannel.h"
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="lines">@@ -51,9 +50,9 @@
</span><span class="cx"> static Ref<MessagePort> create(ScriptExecutionContext& scriptExecutionContext) { return adoptRef(*new MessagePort(scriptExecutionContext)); }
</span><span class="cx"> virtual ~MessagePort();
</span><span class="cx">
</span><del>- void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionCode&);
</del><ins>+ void postMessage(RefPtr<SerializedScriptValue>&& message, const MessagePortArray*, ExceptionCode&);
</ins><span class="cx"> // Needed for Objective-C bindings (see bug 28774).
</span><del>- void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, ExceptionCode&);
</del><ins>+ void postMessage(RefPtr<SerializedScriptValue>&& message, MessagePort*, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void start();
</span><span class="cx"> void close();
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePortChannelh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePortChannel.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePortChannel.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/MessagePortChannel.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -55,8 +55,8 @@
</span><span class="cx"> class MessagePortChannel {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(MessagePortChannel); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- explicit MessagePortChannel(PassRefPtr<PlatformMessagePortChannel>);
- static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>);
</del><ins>+ explicit MessagePortChannel(RefPtr<PlatformMessagePortChannel>&&);
+ static void createChannel(MessagePort*, MessagePort*);
</ins><span class="cx">
</span><span class="cx"> // Entangles the channel with a port (called when a port has been cloned, after the clone has been marshaled to its new owning thread and is ready to receive messages).
</span><span class="cx"> // Returns false if the entanglement failed because the port was closed.
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> bool hasPendingActivity();
</span><span class="cx">
</span><span class="cx"> // Sends a message and optional cloned port to the remote port.
</span><del>- void postMessageToRemote(PassRefPtr<SerializedScriptValue>, std::unique_ptr<MessagePortChannelArray>);
</del><ins>+ void postMessageToRemote(RefPtr<SerializedScriptValue>&&, std::unique_ptr<MessagePortChannelArray>);
</ins><span class="cx">
</span><span class="cx"> // Extracts a message from the message queue for this port.
</span><span class="cx"> bool tryGetMessageFromRemote(RefPtr<SerializedScriptValue>&, std::unique_ptr<MessagePortChannelArray>&);
</span></span></pre></div>
<a id="trunkSourceWebCoredomStaticNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StaticNodeList.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StaticNodeList.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/StaticNodeList.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -39,11 +39,11 @@
</span><span class="cx">
</span><span class="cx"> class WEBCORE_EXPORT StaticNodeList final : public NodeList {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<StaticNodeList> adopt(Vector<Ref<Node>>& nodes)
</del><ins>+ static Ref<StaticNodeList> adopt(Vector<Ref<Node>>& nodes)
</ins><span class="cx"> {
</span><del>- RefPtr<StaticNodeList> nodeList = adoptRef(new StaticNodeList);
</del><ins>+ Ref<StaticNodeList> nodeList = adoptRef(*new StaticNodeList);
</ins><span class="cx"> nodeList->m_nodes.swap(nodes);
</span><del>- return nodeList.release();
</del><ins>+ return nodeList;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<StaticNodeList> createEmpty()
</span></span></pre></div>
<a id="trunkSourceWebCoredomdefaultPlatformMessagePortChannelcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.cpp        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -37,19 +37,19 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PlatformMessagePortChannel::EventData::EventData(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels)
- : m_message(message)
</del><ins>+PlatformMessagePortChannel::EventData::EventData(RefPtr<SerializedScriptValue>&& message, std::unique_ptr<MessagePortChannelArray> channels)
+ : m_message(WTFMove(message))
</ins><span class="cx"> , m_channels(WTFMove(channels))
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MessagePortChannel::createChannel(PassRefPtr<MessagePort> port1, PassRefPtr<MessagePort> port2)
</del><ins>+void MessagePortChannel::createChannel(MessagePort* port1, MessagePort* port2)
</ins><span class="cx"> {
</span><del>- RefPtr<PlatformMessagePortChannel::MessagePortQueue> queue1 = PlatformMessagePortChannel::MessagePortQueue::create();
- RefPtr<PlatformMessagePortChannel::MessagePortQueue> queue2 = PlatformMessagePortChannel::MessagePortQueue::create();
</del><ins>+ Ref<PlatformMessagePortChannel::MessagePortQueue> queue1 = PlatformMessagePortChannel::MessagePortQueue::create();
+ Ref<PlatformMessagePortChannel::MessagePortQueue> queue2 = PlatformMessagePortChannel::MessagePortQueue::create();
</ins><span class="cx">
</span><del>- auto channel1 = std::make_unique<MessagePortChannel>(PlatformMessagePortChannel::create(queue1, queue2));
- auto channel2 = std::make_unique<MessagePortChannel>(PlatformMessagePortChannel::create(queue2, queue1));
</del><ins>+ auto channel1 = std::make_unique<MessagePortChannel>(PlatformMessagePortChannel::create(queue1.ptr(), queue2.ptr()));
+ auto channel2 = std::make_unique<MessagePortChannel>(PlatformMessagePortChannel::create(queue2.ptr(), queue1.ptr()));
</ins><span class="cx">
</span><span class="cx"> channel1->m_channel->m_entangledChannel = channel2->m_channel;
</span><span class="cx"> channel2->m_channel->m_entangledChannel = channel1->m_channel;
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx"> port2->entangle(WTFMove(channel1));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-MessagePortChannel::MessagePortChannel(PassRefPtr<PlatformMessagePortChannel> channel)
- : m_channel(channel)
</del><ins>+MessagePortChannel::MessagePortChannel(RefPtr<PlatformMessagePortChannel>&& channel)
+ : m_channel(WTFMove(channel))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -86,12 +86,12 @@
</span><span class="cx"> remote->setRemotePort(nullptr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MessagePortChannel::postMessageToRemote(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray> channels)
</del><ins>+void MessagePortChannel::postMessageToRemote(RefPtr<SerializedScriptValue>&& message, std::unique_ptr<MessagePortChannelArray> channels)
</ins><span class="cx"> {
</span><span class="cx"> LockHolder lock(m_channel->m_mutex);
</span><span class="cx"> if (!m_channel->m_outgoingQueue)
</span><span class="cx"> return;
</span><del>- bool wasEmpty = m_channel->m_outgoingQueue->appendAndCheckEmpty(std::make_unique<PlatformMessagePortChannel::EventData>(message, WTFMove(channels)));
</del><ins>+ bool wasEmpty = m_channel->m_outgoingQueue->appendAndCheckEmpty(std::make_unique<PlatformMessagePortChannel::EventData>(WTFMove(message), WTFMove(channels)));
</ins><span class="cx"> if (wasEmpty && m_channel->m_remotePort)
</span><span class="cx"> m_channel->m_remotePort->messageAvailable();
</span><span class="cx"> }
</span><span class="lines">@@ -146,12 +146,12 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<PlatformMessagePortChannel> PlatformMessagePortChannel::create(PassRefPtr<MessagePortQueue> incoming, PassRefPtr<MessagePortQueue> outgoing)
</del><ins>+Ref<PlatformMessagePortChannel> PlatformMessagePortChannel::create(MessagePortQueue* incoming, MessagePortQueue* outgoing)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new PlatformMessagePortChannel(incoming, outgoing));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformMessagePortChannel::PlatformMessagePortChannel(PassRefPtr<MessagePortQueue> incoming, PassRefPtr<MessagePortQueue> outgoing)
</del><ins>+PlatformMessagePortChannel::PlatformMessagePortChannel(MessagePortQueue* incoming, MessagePortQueue* outgoing)
</ins><span class="cx"> : m_incomingQueue(incoming)
</span><span class="cx"> , m_outgoingQueue(outgoing)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoredomdefaultPlatformMessagePortChannelh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h (198482 => 198483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h        2016-03-21 05:28:21 UTC (rev 198482)
+++ trunk/Source/WebCore/dom/default/PlatformMessagePortChannel.h        2016-03-21 06:05:49 UTC (rev 198483)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include "MessagePortChannel.h"
</span><span class="cx">
</span><span class="cx"> #include <wtf/MessageQueue.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -49,9 +48,9 @@
</span><span class="cx"> class EventData {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(EventData); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- EventData(PassRefPtr<SerializedScriptValue> message, std::unique_ptr<MessagePortChannelArray>);
</del><ins>+ EventData(RefPtr<SerializedScriptValue>&& message, std::unique_ptr<MessagePortChannelArray>);
</ins><span class="cx">
</span><del>- PassRefPtr<SerializedScriptValue> message() { return m_message; }
</del><ins>+ RefPtr<SerializedScriptValue> message() { return m_message; }
</ins><span class="cx"> std::unique_ptr<MessagePortChannelArray> channels() { return WTFMove(m_channels); }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -87,8 +86,8 @@
</span><span class="cx">
</span><span class="cx"> ~PlatformMessagePortChannel();
</span><span class="cx">
</span><del>- static Ref<PlatformMessagePortChannel> create(PassRefPtr<MessagePortQueue> incoming, PassRefPtr<MessagePortQueue> outgoing);
- PlatformMessagePortChannel(PassRefPtr<MessagePortQueue> incoming, PassRefPtr<MessagePortQueue> outgoing);
</del><ins>+ static Ref<PlatformMessagePortChannel> create(MessagePortQueue* incoming, MessagePortQueue* outgoing);
+ PlatformMessagePortChannel(MessagePortQueue* incoming, MessagePortQueue* outgoing);
</ins><span class="cx">
</span><span class="cx"> RefPtr<PlatformMessagePortChannel> entangledChannel();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>