<!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>[168578] 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/168578">168578</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-05-10 12:14:21 -0700 (Sat, 10 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move Source/WebCore/workers/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=132401
Reviewed by Andreas Kling.
Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
with std::unique_ptr.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setTimeout):
(WebCore::JSDOMWindow::setInterval):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
* bindings/js/ScheduledAction.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::didStop):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):
* page/DOMWindow.h:
* workers/WorkerEventQueue.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::clearScript):
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::WorkerRunLoop):
* workers/WorkerRunLoop.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::createResourceRequest):
* workers/WorkerScriptLoader.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThreadStartupData::create): Deleted.
* workers/WorkerThread.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeCustomcpp">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScheduledActioncpp">trunk/Source/WebCore/bindings/js/ScheduledAction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScheduledActionh">trunk/Source/WebCore/bindings/js/ScheduledAction.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMTimercpp">trunk/Source/WebCore/page/DOMTimer.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMTimerh">trunk/Source/WebCore/page/DOMTimer.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerEventQueueh">trunk/Source/WebCore/workers/WorkerEventQueue.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopeh">trunk/Source/WebCore/workers/WorkerGlobalScope.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerLoaderProxyh">trunk/Source/WebCore/workers/WorkerLoaderProxy.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerMessagingProxyh">trunk/Source/WebCore/workers/WorkerMessagingProxy.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerRunLoopcpp">trunk/Source/WebCore/workers/WorkerRunLoop.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerRunLooph">trunk/Source/WebCore/workers/WorkerRunLoop.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerScriptLoadercpp">trunk/Source/WebCore/workers/WorkerScriptLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerScriptLoaderh">trunk/Source/WebCore/workers/WorkerScriptLoader.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerThreadcpp">trunk/Source/WebCore/workers/WorkerThread.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerThreadh">trunk/Source/WebCore/workers/WorkerThread.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/ChangeLog        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2014-05-10 Zan Dobersek <zdobersek@igalia.com>
+
+ Move Source/WebCore/workers/ code to std::unique_ptr
+ https://bugs.webkit.org/show_bug.cgi?id=132401
+
+ Reviewed by Andreas Kling.
+
+ Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
+ with std::unique_ptr.
+
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::setTimeout):
+ (WebCore::JSDOMWindow::setInterval):
+ * bindings/js/JSWorkerGlobalScopeCustom.cpp:
+ (WebCore::JSWorkerGlobalScope::setTimeout):
+ (WebCore::JSWorkerGlobalScope::setInterval):
+ * bindings/js/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::create):
+ * bindings/js/ScheduledAction.h:
+ * page/DOMTimer.cpp:
+ (WebCore::DOMTimer::DOMTimer):
+ (WebCore::DOMTimer::install):
+ (WebCore::DOMTimer::fired):
+ (WebCore::DOMTimer::didStop):
+ * page/DOMTimer.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::setTimeout):
+ (WebCore::DOMWindow::setInterval):
+ * page/DOMWindow.h:
+ * workers/WorkerEventQueue.h:
+ * workers/WorkerGlobalScope.cpp:
+ (WebCore::WorkerGlobalScope::WorkerGlobalScope):
+ (WebCore::WorkerGlobalScope::setTimeout):
+ (WebCore::WorkerGlobalScope::setInterval):
+ * workers/WorkerGlobalScope.h:
+ (WebCore::WorkerGlobalScope::clearScript):
+ * workers/WorkerLoaderProxy.h:
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerRunLoop.cpp:
+ (WebCore::WorkerRunLoop::WorkerRunLoop):
+ * workers/WorkerRunLoop.h:
+ * workers/WorkerScriptLoader.cpp:
+ (WebCore::WorkerScriptLoader::loadSynchronously):
+ (WebCore::WorkerScriptLoader::loadAsynchronously):
+ (WebCore::WorkerScriptLoader::createResourceRequest):
+ * workers/WorkerScriptLoader.h:
+ * workers/WorkerThread.cpp:
+ (WebCore::WorkerThread::WorkerThread):
+ (WebCore::WorkerThread::workerThread):
+ (WebCore::WorkerThreadStartupData::create): Deleted.
+ * workers/WorkerThread.h:
+
</ins><span class="cx"> 2014-05-09 Dean Jackson <dino@apple.com>
</span><span class="cx">
</span><span class="cx"> -webkit-filter prevents rendering at retina scale
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -594,7 +594,7 @@
</span><span class="cx"> JSValue JSDOMWindow::setTimeout(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx"> ContentSecurityPolicy* contentSecurityPolicy = impl().document() ? impl().document()->contentSecurityPolicy() : 0;
</span><del>- OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), contentSecurityPolicy);
</del><ins>+ std::unique_ptr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), contentSecurityPolicy);
</ins><span class="cx"> if (exec->hadException())
</span><span class="cx"> return jsUndefined();
</span><span class="cx">
</span><span class="lines">@@ -604,7 +604,7 @@
</span><span class="cx"> int delay = exec->argument(1).toInt32(exec);
</span><span class="cx">
</span><span class="cx"> ExceptionCode ec = 0;
</span><del>- int result = impl().setTimeout(action.release(), delay, ec);
</del><ins>+ int result = impl().setTimeout(std::move(action), delay, ec);
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx">
</span><span class="cx"> return jsNumber(result);
</span><span class="lines">@@ -613,7 +613,7 @@
</span><span class="cx"> JSValue JSDOMWindow::setInterval(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx"> ContentSecurityPolicy* contentSecurityPolicy = impl().document() ? impl().document()->contentSecurityPolicy() : 0;
</span><del>- OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), contentSecurityPolicy);
</del><ins>+ std::unique_ptr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), contentSecurityPolicy);
</ins><span class="cx"> if (exec->hadException())
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> int delay = exec->argument(1).toInt32(exec);
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx"> return jsNumber(0);
</span><span class="cx">
</span><span class="cx"> ExceptionCode ec = 0;
</span><del>- int result = impl().setInterval(action.release(), delay, ec);
</del><ins>+ int result = impl().setInterval(std::move(action), delay, ec);
</ins><span class="cx"> setDOMException(exec, ec);
</span><span class="cx">
</span><span class="cx"> return jsNumber(result);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -87,24 +87,24 @@
</span><span class="cx">
</span><span class="cx"> JSValue JSWorkerGlobalScope::setTimeout(ExecState* exec)
</span><span class="cx"> {
</span><del>- OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), impl().contentSecurityPolicy());
</del><ins>+ std::unique_ptr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), impl().contentSecurityPolicy());
</ins><span class="cx"> if (exec->hadException())
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> if (!action)
</span><span class="cx"> return jsNumber(0);
</span><span class="cx"> int delay = exec->argument(1).toInt32(exec);
</span><del>- return jsNumber(impl().setTimeout(action.release(), delay));
</del><ins>+ return jsNumber(impl().setTimeout(std::move(action), delay));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSValue JSWorkerGlobalScope::setInterval(ExecState* exec)
</span><span class="cx"> {
</span><del>- OwnPtr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), impl().contentSecurityPolicy());
</del><ins>+ std::unique_ptr<ScheduledAction> action = ScheduledAction::create(exec, globalObject()->world(), impl().contentSecurityPolicy());
</ins><span class="cx"> if (exec->hadException())
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> if (!action)
</span><span class="cx"> return jsNumber(0);
</span><span class="cx"> int delay = exec->argument(1).toInt32(exec);
</span><del>- return jsNumber(impl().setInterval(action.release(), delay));
</del><ins>+ return jsNumber(impl().setInterval(std::move(action), delay));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScheduledActioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScheduledAction.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScheduledAction.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/bindings/js/ScheduledAction.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassOwnPtr<ScheduledAction> ScheduledAction::create(ExecState* exec, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy* policy)
</del><ins>+std::unique_ptr<ScheduledAction> ScheduledAction::create(ExecState* exec, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy* policy)
</ins><span class="cx"> {
</span><span class="cx"> JSValue v = exec->argument(0);
</span><span class="cx"> CallData callData;
</span><span class="lines">@@ -56,10 +56,10 @@
</span><span class="cx"> String string = v.toString(exec)->value(exec);
</span><span class="cx"> if (exec->hadException())
</span><span class="cx"> return nullptr;
</span><del>- return adoptPtr(new ScheduledAction(string, isolatedWorld));
</del><ins>+ return std::unique_ptr<ScheduledAction>(new ScheduledAction(string, isolatedWorld));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return adoptPtr(new ScheduledAction(exec, v, isolatedWorld));
</del><ins>+ return std::unique_ptr<ScheduledAction>(new ScheduledAction(exec, v, isolatedWorld));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScheduledAction::ScheduledAction(ExecState* exec, JSValue function, DOMWrapperWorld& isolatedWorld)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScheduledActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScheduledAction.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScheduledAction.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/bindings/js/ScheduledAction.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -23,8 +23,8 @@
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include <heap/Strong.h>
</span><span class="cx"> #include <heap/StrongInlines.h>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <runtime/JSCell.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> class ScheduledAction {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(ScheduledAction); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ScheduledAction> create(JSC::ExecState*, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy*);
</del><ins>+ static std::unique_ptr<ScheduledAction> create(JSC::ExecState*, DOMWrapperWorld& isolatedWorld, ContentSecurityPolicy*);
</ins><span class="cx">
</span><span class="cx"> void execute(ScriptExecutionContext*);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMTimercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMTimer.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMTimer.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/page/DOMTimer.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -58,10 +58,10 @@
</span><span class="cx"> && nestingLevel == 1; // Gestures should not be forwarded to nested timers.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DOMTimer::DOMTimer(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction> action, int interval, bool singleShot)
</del><ins>+DOMTimer::DOMTimer(ScriptExecutionContext* context, std::unique_ptr<ScheduledAction> action, int interval, bool singleShot)
</ins><span class="cx"> : SuspendableTimer(context)
</span><span class="cx"> , m_nestingLevel(timerNestingLevel + 1)
</span><del>- , m_action(action)
</del><ins>+ , m_action(std::move(action))
</ins><span class="cx"> , m_originalInterval(interval)
</span><span class="cx"> , m_shouldForwardUserGesture(shouldForwardUserGesture(interval, m_nestingLevel))
</span><span class="cx"> {
</span><span class="lines">@@ -83,12 +83,12 @@
</span><span class="cx"> scriptExecutionContext()->removeTimeout(m_timeoutId);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int DOMTimer::install(ScriptExecutionContext* context, PassOwnPtr<ScheduledAction> action, int timeout, bool singleShot)
</del><ins>+int DOMTimer::install(ScriptExecutionContext* context, std::unique_ptr<ScheduledAction> action, int timeout, bool singleShot)
</ins><span class="cx"> {
</span><span class="cx"> // DOMTimer constructor links the new timer into a list of ActiveDOMObjects held by the 'context'.
</span><span class="cx"> // The timer is deleted when context is deleted (DOMTimer::contextDestroyed) or explicitly via DOMTimer::removeById(),
</span><span class="cx"> // or if it is a one-time timer and it has fired (DOMTimer::fired).
</span><del>- DOMTimer* timer = new DOMTimer(context, action, timeout, singleShot);
</del><ins>+ DOMTimer* timer = new DOMTimer(context, std::move(action), timeout, singleShot);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (context->isDocument()) {
</span><span class="cx"> Document& document = toDocument(*context);
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Delete timer before executing the action for one-shot timers.
</span><del>- OwnPtr<ScheduledAction> action = m_action.release();
</del><ins>+ ScheduledAction* action = m_action.release();
</ins><span class="cx">
</span><span class="cx"> // No access to member variables after this point.
</span><span class="cx"> delete this;
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx"> // Need to release JS objects potentially protected by ScheduledAction
</span><span class="cx"> // because they can form circular references back to the ScriptExecutionContext
</span><span class="cx"> // which will cause a memory leak.
</span><del>- m_action.clear();
</del><ins>+ m_action = nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMTimer::adjustMinimumTimerInterval(double oldMinimumTimerInterval)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMTimerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMTimer.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMTimer.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/page/DOMTimer.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -28,8 +28,7 @@
</span><span class="cx"> #define DOMTimer_h
</span><span class="cx">
</span><span class="cx"> #include "SuspendableTimer.h"
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <memory>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -40,7 +39,7 @@
</span><span class="cx"> virtual ~DOMTimer();
</span><span class="cx"> // Creates a new timer owned by specified ScriptExecutionContext, starts it
</span><span class="cx"> // and returns its Id.
</span><del>- static int install(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int timeout, bool singleShot);
</del><ins>+ static int install(ScriptExecutionContext*, std::unique_ptr<ScheduledAction>, int timeout, bool singleShot);
</ins><span class="cx"> static void removeById(ScriptExecutionContext*, int timeoutId);
</span><span class="cx">
</span><span class="cx"> // Adjust to a change in the ScriptExecutionContext's minimum timer interval.
</span><span class="lines">@@ -49,7 +48,7 @@
</span><span class="cx"> void adjustMinimumTimerInterval(double oldMinimumTimerInterval);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- DOMTimer(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int interval, bool singleShot);
</del><ins>+ DOMTimer(ScriptExecutionContext*, std::unique_ptr<ScheduledAction>, int interval, bool singleShot);
</ins><span class="cx"> virtual void fired() override;
</span><span class="cx">
</span><span class="cx"> // ActiveDOMObject
</span><span class="lines">@@ -65,7 +64,7 @@
</span><span class="cx">
</span><span class="cx"> int m_timeoutId;
</span><span class="cx"> int m_nestingLevel;
</span><del>- OwnPtr<ScheduledAction> m_action;
</del><ins>+ std::unique_ptr<ScheduledAction> m_action;
</ins><span class="cx"> int m_originalInterval;
</span><span class="cx"> bool m_shouldForwardUserGesture;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -1513,14 +1513,14 @@
</span><span class="cx"> page->chrome().setWindowRect(adjustWindowRect(page, update));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int DOMWindow::setTimeout(PassOwnPtr<ScheduledAction> action, int timeout, ExceptionCode& ec)
</del><ins>+int DOMWindow::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> ScriptExecutionContext* context = scriptExecutionContext();
</span><span class="cx"> if (!context) {
</span><span class="cx"> ec = INVALID_ACCESS_ERR;
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><del>- return DOMTimer::install(context, action, timeout, true);
</del><ins>+ return DOMTimer::install(context, std::move(action), timeout, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::clearTimeout(int timeoutId)
</span><span class="lines">@@ -1547,14 +1547,14 @@
</span><span class="cx"> DOMTimer::removeById(context, timeoutId);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int DOMWindow::setInterval(PassOwnPtr<ScheduledAction> action, int timeout, ExceptionCode& ec)
</del><ins>+int DOMWindow::setInterval(std::unique_ptr<ScheduledAction> action, int timeout, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> ScriptExecutionContext* context = scriptExecutionContext();
</span><span class="cx"> if (!context) {
</span><span class="cx"> ec = INVALID_ACCESS_ERR;
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><del>- return DOMTimer::install(context, action, timeout, false);
</del><ins>+ return DOMTimer::install(context, std::move(action), timeout, false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::clearInterval(int timeoutId)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/page/DOMWindow.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "Supplementable.h"
</span><span class="cx"> #include <functional>
</span><ins>+#include <memory>
</ins><span class="cx">
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> class ScriptCallStack;
</span><span class="lines">@@ -253,9 +254,9 @@
</span><span class="cx"> void resizeTo(float width, float height) const;
</span><span class="cx">
</span><span class="cx"> // Timers
</span><del>- int setTimeout(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
</del><ins>+ int setTimeout(std::unique_ptr<ScheduledAction>, int timeout, ExceptionCode&);
</ins><span class="cx"> void clearTimeout(int timeoutId);
</span><del>- int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
</del><ins>+ int setInterval(std::unique_ptr<ScheduledAction>, int timeout, ExceptionCode&);
</ins><span class="cx"> void clearInterval(int timeoutId);
</span><span class="cx">
</span><span class="cx"> // WebKit animation extensions
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerEventQueueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerEventQueue.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerEventQueue.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerEventQueue.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx">
</span><span class="cx"> #include "EventQueue.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> : m_url(url)
</span><span class="cx"> , m_userAgent(userAgent)
</span><span class="cx"> , m_groupSettings(std::move(settings))
</span><del>- , m_script(adoptPtr(new WorkerScriptController(this)))
</del><ins>+ , m_script(std::make_unique<WorkerScriptController>(this))
</ins><span class="cx"> , m_thread(thread)
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> , m_workerInspectorController(std::make_unique<WorkerInspectorController>(*this))
</span><span class="lines">@@ -152,9 +152,9 @@
</span><span class="cx"> thread().runLoop().postTask(std::move(task));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int WorkerGlobalScope::setTimeout(PassOwnPtr<ScheduledAction> action, int timeout)
</del><ins>+int WorkerGlobalScope::setTimeout(std::unique_ptr<ScheduledAction> action, int timeout)
</ins><span class="cx"> {
</span><del>- return DOMTimer::install(scriptExecutionContext(), action, timeout, true);
</del><ins>+ return DOMTimer::install(scriptExecutionContext(), std::move(action), timeout, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WorkerGlobalScope::clearTimeout(int timeoutId)
</span><span class="lines">@@ -162,9 +162,9 @@
</span><span class="cx"> DOMTimer::removeById(scriptExecutionContext(), timeoutId);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int WorkerGlobalScope::setInterval(PassOwnPtr<ScheduledAction> action, int timeout)
</del><ins>+int WorkerGlobalScope::setInterval(std::unique_ptr<ScheduledAction> action, int timeout)
</ins><span class="cx"> {
</span><del>- return DOMTimer::install(scriptExecutionContext(), action, timeout, false);
</del><ins>+ return DOMTimer::install(scriptExecutionContext(), std::move(action), timeout, false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WorkerGlobalScope::clearInterval(int timeoutId)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include "WorkerEventQueue.h"
</span><span class="cx"> #include "WorkerScriptController.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Assertions.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> virtual void disableEval(const String& errorMessage) override;
</span><span class="cx">
</span><span class="cx"> WorkerScriptController* script() { return m_script.get(); }
</span><del>- void clearScript() { m_script.clear(); }
</del><ins>+ void clearScript() { m_script = nullptr; }
</ins><span class="cx">
</span><span class="cx"> WorkerThread& thread() const { return m_thread; }
</span><span class="cx">
</span><span class="lines">@@ -94,9 +94,9 @@
</span><span class="cx"> WorkerNavigator* navigator() const;
</span><span class="cx">
</span><span class="cx"> // Timers
</span><del>- int setTimeout(PassOwnPtr<ScheduledAction>, int timeout);
</del><ins>+ int setTimeout(std::unique_ptr<ScheduledAction>, int timeout);
</ins><span class="cx"> void clearTimeout(int timeoutId);
</span><del>- int setInterval(PassOwnPtr<ScheduledAction>, int timeout);
</del><ins>+ int setInterval(std::unique_ptr<ScheduledAction>, int timeout);
</ins><span class="cx"> void clearInterval(int timeoutId);
</span><span class="cx">
</span><span class="cx"> virtual bool isContextThread() const override;
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx"> mutable RefPtr<WorkerLocation> m_location;
</span><span class="cx"> mutable RefPtr<WorkerNavigator> m_navigator;
</span><span class="cx">
</span><del>- OwnPtr<WorkerScriptController> m_script;
</del><ins>+ std::unique_ptr<WorkerScriptController> m_script;
</ins><span class="cx"> WorkerThread& m_thread;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerLoaderProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerLoaderProxy.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerLoaderProxy.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerLoaderProxy.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx">
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerMessagingProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerMessagingProxy.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerRunLoopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerRunLoop.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerRunLoop.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WorkerRunLoop::WorkerRunLoop()
</span><del>- : m_sharedTimer(adoptPtr(new WorkerSharedTimer))
</del><ins>+ : m_sharedTimer(std::make_unique<WorkerSharedTimer>())
</ins><span class="cx"> , m_nestedCount(0)
</span><span class="cx"> , m_uniqueId(0)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerRunLooph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerRunLoop.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerRunLoop.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -32,9 +32,8 @@
</span><span class="cx"> #define WorkerRunLoop_h
</span><span class="cx">
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/MessageQueue.h>
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -90,7 +89,7 @@
</span><span class="cx"> void runCleanupTasks(WorkerGlobalScope*);
</span><span class="cx">
</span><span class="cx"> MessageQueue<Task> m_messageQueue;
</span><del>- OwnPtr<WorkerSharedTimer> m_sharedTimer;
</del><ins>+ std::unique_ptr<WorkerSharedTimer> m_sharedTimer;
</ins><span class="cx"> int m_nestedCount;
</span><span class="cx"> unsigned long m_uniqueId;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerScriptLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerScriptLoader.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include "WorkerGlobalScope.h"
</span><span class="cx"> #include "WorkerScriptLoaderClient.h"
</span><span class="cx"> #include "WorkerThreadableLoader.h"
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -59,7 +58,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_url = url;
</span><span class="cx">
</span><del>- OwnPtr<ResourceRequest> request(createResourceRequest());
</del><ins>+ std::unique_ptr<ResourceRequest> request(createResourceRequest());
</ins><span class="cx"> if (!request)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -79,7 +78,7 @@
</span><span class="cx"> m_client = client;
</span><span class="cx"> m_url = url;
</span><span class="cx">
</span><del>- OwnPtr<ResourceRequest> request(createResourceRequest());
</del><ins>+ std::unique_ptr<ResourceRequest> request(createResourceRequest());
</ins><span class="cx"> if (!request)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -99,11 +98,11 @@
</span><span class="cx"> return m_responseURL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest()
</del><ins>+std::unique_ptr<ResourceRequest> WorkerScriptLoader::createResourceRequest()
</ins><span class="cx"> {
</span><del>- OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest(m_url));
</del><ins>+ auto request = std::make_unique<ResourceRequest>(m_url);
</ins><span class="cx"> request->setHTTPMethod("GET");
</span><del>- return request.release();
</del><ins>+ return std::move(request);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerScriptLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerScriptLoader.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include "ResourceRequest.h"
</span><span class="cx"> #include "ThreadableLoader.h"
</span><span class="cx"> #include "ThreadableLoaderClient.h"
</span><del>-
</del><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> WorkerScriptLoader();
</span><span class="cx"> ~WorkerScriptLoader();
</span><span class="cx">
</span><del>- PassOwnPtr<ResourceRequest> createResourceRequest();
</del><ins>+ std::unique_ptr<ResourceRequest> createResourceRequest();
</ins><span class="cx"> void notifyFinished();
</span><span class="cx">
</span><span class="cx"> WorkerScriptLoaderClient* m_client;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerThread.cpp        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -79,10 +79,7 @@
</span><span class="cx"> struct WorkerThreadStartupData {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<WorkerThreadStartupData> create(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
- {
- return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin));
- }
</del><ins>+ WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin);
</ins><span class="cx">
</span><span class="cx"> URL m_scriptURL;
</span><span class="cx"> String m_userAgent;
</span><span class="lines">@@ -92,8 +89,6 @@
</span><span class="cx"> String m_contentSecurityPolicy;
</span><span class="cx"> ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType;
</span><span class="cx"> RefPtr<SecurityOrigin> m_topOrigin;
</span><del>-private:
- WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin);
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
</span><span class="lines">@@ -118,7 +113,7 @@
</span><span class="cx"> : m_threadID(0)
</span><span class="cx"> , m_workerLoaderProxy(workerLoaderProxy)
</span><span class="cx"> , m_workerReportingProxy(workerReportingProxy)
</span><del>- , m_startupData(WorkerThreadStartupData::create(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin))
</del><ins>+ , m_startupData(std::make_unique<WorkerThreadStartupData>(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin))
</ins><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span><span class="cx"> , m_notificationClient(0)
</span><span class="cx"> #endif
</span><span class="lines">@@ -180,7 +175,7 @@
</span><span class="cx"> // Free the startup data to cause its member variable deref's happen on the worker's thread (since
</span><span class="cx"> // all ref/derefs of these objects are happening on the thread at this point). Note that
</span><span class="cx"> // WorkerThread::~WorkerThread happens on a different thread where it was created.
</span><del>- m_startupData.clear();
</del><ins>+ m_startupData = nullptr;
</ins><span class="cx">
</span><span class="cx"> runEventLoop();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerThread.h (168577 => 168578)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerThread.h        2014-05-10 09:30:02 UTC (rev 168577)
+++ trunk/Source/WebCore/workers/WorkerThread.h        2014-05-10 19:14:21 UTC (rev 168578)
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx"> #include "ContentSecurityPolicy.h"
</span><span class="cx"> #include "GroupSettings.h"
</span><span class="cx"> #include "WorkerRunLoop.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> RefPtr<WorkerGlobalScope> m_workerGlobalScope;
</span><span class="cx"> Mutex m_threadCreationMutex;
</span><span class="cx">
</span><del>- OwnPtr<WorkerThreadStartupData> m_startupData;
</del><ins>+ std::unique_ptr<WorkerThreadStartupData> m_startupData;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span><span class="cx"> NotificationClient* m_notificationClient;
</span></span></pre>
</div>
</div>
</body>
</html>