<!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>[197306] 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/197306">197306</a></dd>
<dt>Author</dt> <dd>gyuyoung.kim@webkit.org</dd>
<dt>Date</dt> <dd>2016-02-28 17:57:41 -0800 (Sun, 28 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reduce uses of PassRefPtr in indexeddb
https://bugs.webkit.org/show_bug.cgi?id=154273

Reviewed by Darin Adler.

No new tests, no behavior changes.

* Modules/indexeddb/IDBDatabaseError.h:
(WebCore::IDBDatabaseError::create):
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::maybeCreateIDBKey):
* Modules/indexeddb/IDBKeyData.h:
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::create):
(WebCore::IDBKeyRange::IDBKeyRange):
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRange.h:
(WebCore::IDBKeyRange::create):
(WebCore::IDBKeyRange::lower):
(WebCore::IDBKeyRange::upper):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
* Modules/indexeddb/IDBKeyRangeData.h:
* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/legacy/IDBCallbacks.h:
* Modules/indexeddb/legacy/IDBCursorBackend.cpp:
(WebCore::IDBCursorBackend::continueFunction):
* Modules/indexeddb/legacy/IDBCursorBackend.h:
* Modules/indexeddb/legacy/IDBCursorBackendOperations.h:
(WebCore::CursorIterationOperation::create):
(WebCore::CursorIterationOperation::CursorIterationOperation):
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):
(WebCore::PutOperation::perform):
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::continueFunction):
* Modules/indexeddb/legacy/LegacyCursor.h:
* Modules/indexeddb/legacy/LegacyFactory.h:
(WebCore::LegacyFactory::create):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::onSuccess):
* Modules/indexeddb/legacy/LegacyRequest.h:
* inspector/InspectorIndexedDBAgent.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseErrorh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatah">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangecpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeh">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatah">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/ChangeLog        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2016-02-28  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
+
+        Reduce uses of PassRefPtr in indexeddb
+        https://bugs.webkit.org/show_bug.cgi?id=154273
+
+        Reviewed by Darin Adler.
+
+        No new tests, no behavior changes.
+
+        * Modules/indexeddb/IDBDatabaseError.h:
+        (WebCore::IDBDatabaseError::create):
+        * Modules/indexeddb/IDBKeyData.cpp:
+        (WebCore::IDBKeyData::maybeCreateIDBKey):
+        * Modules/indexeddb/IDBKeyData.h:
+        * Modules/indexeddb/IDBKeyRange.cpp:
+        (WebCore::IDBKeyRange::create):
+        (WebCore::IDBKeyRange::IDBKeyRange):
+        (WebCore::IDBKeyRange::only):
+        (WebCore::IDBKeyRange::lowerBound):
+        (WebCore::IDBKeyRange::upperBound):
+        (WebCore::IDBKeyRange::bound):
+        * Modules/indexeddb/IDBKeyRange.h:
+        (WebCore::IDBKeyRange::create):
+        (WebCore::IDBKeyRange::lower):
+        (WebCore::IDBKeyRange::upper):
+        (WebCore::IDBKeyRange::lowerBound):
+        (WebCore::IDBKeyRange::upperBound):
+        (WebCore::IDBKeyRange::bound):
+        * Modules/indexeddb/IDBKeyRangeData.cpp:
+        (WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
+        * Modules/indexeddb/IDBKeyRangeData.h:
+        * Modules/indexeddb/IDBServerConnection.h:
+        * Modules/indexeddb/legacy/IDBCallbacks.h:
+        * Modules/indexeddb/legacy/IDBCursorBackend.cpp:
+        (WebCore::IDBCursorBackend::continueFunction):
+        * Modules/indexeddb/legacy/IDBCursorBackend.h:
+        * Modules/indexeddb/legacy/IDBCursorBackendOperations.h:
+        (WebCore::CursorIterationOperation::create):
+        (WebCore::CursorIterationOperation::CursorIterationOperation):
+        * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
+        (WebCore::GetOperation::perform):
+        (WebCore::PutOperation::perform):
+        * Modules/indexeddb/legacy/LegacyCursor.cpp:
+        (WebCore::LegacyCursor::continueFunction):
+        * Modules/indexeddb/legacy/LegacyCursor.h:
+        * Modules/indexeddb/legacy/LegacyFactory.h:
+        (WebCore::LegacyFactory::create):
+        * Modules/indexeddb/legacy/LegacyRequest.cpp:
+        (WebCore::LegacyRequest::onSuccess):
+        * Modules/indexeddb/legacy/LegacyRequest.h:
+        * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2016-02-28  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Switch to application/vnd.apple.folder for &lt;attachment&gt; folder special-case
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseError.h        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -37,18 +37,18 @@
</span><span class="cx"> 
</span><span class="cx"> class IDBDatabaseError : public RefCounted&lt;IDBDatabaseError&gt; {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;IDBDatabaseError&gt; create(unsigned short code)
</del><ins>+    static Ref&lt;IDBDatabaseError&gt; create(unsigned short code)
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(code &gt;= IDBDatabaseException::IDBDatabaseExceptionOffset);
</span><span class="cx">         ASSERT(code &lt; IDBDatabaseException::IDBDatabaseExceptionMax);
</span><del>-        return adoptRef(new IDBDatabaseError(code));
</del><ins>+        return adoptRef(*new IDBDatabaseError(code));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;IDBDatabaseError&gt; create(unsigned short code, const String&amp; message)
</del><ins>+    static Ref&lt;IDBDatabaseError&gt; create(unsigned short code, const String&amp; message)
</ins><span class="cx">     {
</span><span class="cx">         ASSERT_WITH_MESSAGE(code &gt;= IDBDatabaseException::IDBDatabaseExceptionOffset, &quot;%d &gt;= %d&quot;, code, IDBDatabaseException::IDBDatabaseExceptionOffset);
</span><span class="cx">         ASSERT(code &lt; IDBDatabaseException::IDBDatabaseExceptionMax);
</span><del>-        return adoptRef(new IDBDatabaseError(code, message));
</del><ins>+        return adoptRef(*new IDBDatabaseError(code, message));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ~IDBDatabaseError() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKey&gt; IDBKeyData::maybeCreateIDBKey() const
</del><ins>+RefPtr&lt;IDBKey&gt; IDBKeyData::maybeCreateIDBKey() const
</ins><span class="cx"> {
</span><span class="cx">     if (m_isNull)
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT PassRefPtr&lt;IDBKey&gt; maybeCreateIDBKey() const;
</del><ins>+    WEBCORE_EXPORT RefPtr&lt;IDBKey&gt; maybeCreateIDBKey() const;
</ins><span class="cx"> 
</span><span class="cx">     IDBKeyData isolatedCopy() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -35,15 +35,15 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBKeyRange&gt; IDBKeyRange::create(PassRefPtr&lt;IDBKey&gt; prpKey)
</del><ins>+Ref&lt;IDBKeyRange&gt; IDBKeyRange::create(RefPtr&lt;IDBKey&gt;&amp;&amp; key)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;IDBKey&gt; key = prpKey;
-    return adoptRef(*new IDBKeyRange(key, key, LowerBoundClosed, UpperBoundClosed));
</del><ins>+    RefPtr&lt;IDBKey&gt; upperBound = key;
+    return adoptRef(*new IDBKeyRange(WTFMove(key), WTFMove(upperBound), LowerBoundClosed, UpperBoundClosed));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBKeyRange::IDBKeyRange(PassRefPtr&lt;IDBKey&gt; lower, PassRefPtr&lt;IDBKey&gt; upper, LowerBoundType lowerType, UpperBoundType upperType)
-    : m_lower(lower)
-    , m_upper(upper)
</del><ins>+IDBKeyRange::IDBKeyRange(RefPtr&lt;IDBKey&gt;&amp;&amp; lower, RefPtr&lt;IDBKey&gt;&amp;&amp; upper, LowerBoundType lowerType, UpperBoundType upperType)
+    : m_lower(WTFMove(lower))
+    , m_upper(WTFMove(upper))
</ins><span class="cx">     , m_lowerType(lowerType)
</span><span class="cx">     , m_upperType(upperType)
</span><span class="cx"> {
</span><span class="lines">@@ -61,54 +61,53 @@
</span><span class="cx">     return idbKeyToScriptValue(&amp;requestState, m_upper);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(PassRefPtr&lt;IDBKey&gt; prpKey, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(RefPtr&lt;IDBKey&gt;&amp;&amp; key, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;IDBKey&gt; key = prpKey;
</del><span class="cx">     if (!key || !key-&gt;isValid()) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(key, key, LowerBoundClosed, UpperBoundClosed);
</del><ins>+    return create(WTFMove(key));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     DOMRequestState requestState(context);
</span><span class="cx">     RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
</span><span class="cx">     if (!key || !key-&gt;isValid()) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(key, key, LowerBoundClosed, UpperBoundClosed);
</del><ins>+    return create(WTFMove(key));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRange::lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     DOMRequestState requestState(context);
</span><span class="cx">     RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(&amp;requestState, boundValue);
</span><span class="cx">     if (!bound || !bound-&gt;isValid()) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(bound, 0, open ? LowerBoundOpen : LowerBoundClosed, UpperBoundOpen);
</del><ins>+    return IDBKeyRange::create(WTFMove(bound), nullptr, open ? LowerBoundOpen : LowerBoundClosed, UpperBoundOpen);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRange::upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     DOMRequestState requestState(context);
</span><span class="cx">     RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(&amp;requestState, boundValue);
</span><span class="cx">     if (!bound || !bound-&gt;isValid()) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(0, bound, LowerBoundOpen, open ? UpperBoundOpen : UpperBoundClosed);
</del><ins>+    return IDBKeyRange::create(nullptr, WTFMove(bound), LowerBoundOpen, open ? UpperBoundOpen : UpperBoundClosed);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRange::bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lowerValue, const Deprecated::ScriptValue&amp; upperValue, bool lowerOpen, bool upperOpen, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lowerValue, const Deprecated::ScriptValue&amp; upperValue, bool lowerOpen, bool upperOpen, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     DOMRequestState requestState(context);
</span><span class="cx">     RefPtr&lt;IDBKey&gt; lower = scriptValueToIDBKey(&amp;requestState, lowerValue);
</span><span class="lines">@@ -116,18 +115,18 @@
</span><span class="cx"> 
</span><span class="cx">     if (!lower || !lower-&gt;isValid() || !upper || !upper-&gt;isValid()) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx">     if (upper-&gt;isLessThan(lower.get())) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx">     if (upper-&gt;isEqual(lower.get()) &amp;&amp; (lowerOpen || upperOpen)) {
</span><span class="cx">         ec = IDBDatabaseException::DataError;
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(lower, upper, lowerOpen ? LowerBoundOpen : LowerBoundClosed, upperOpen ? UpperBoundOpen : UpperBoundClosed);
</del><ins>+    return IDBKeyRange::create(WTFMove(lower), WTFMove(upper), lowerOpen ? LowerBoundOpen : LowerBoundClosed, upperOpen ? UpperBoundOpen : UpperBoundClosed);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool IDBKeyRange::isOnlyKey() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;Dictionary.h&quot;
</span><span class="cx"> #include &quot;IDBKey.h&quot;
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -49,38 +48,38 @@
</span><span class="cx">         UpperBoundClosed
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    static Ref&lt;IDBKeyRange&gt; create(PassRefPtr&lt;IDBKey&gt; lower, PassRefPtr&lt;IDBKey&gt; upper, LowerBoundType lowerType, UpperBoundType upperType)
</del><ins>+    static Ref&lt;IDBKeyRange&gt; create(RefPtr&lt;IDBKey&gt;&amp;&amp; lower, RefPtr&lt;IDBKey&gt;&amp;&amp; upper, LowerBoundType lowerType, UpperBoundType upperType)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new IDBKeyRange(lower, upper, lowerType, upperType));
</del><ins>+        return adoptRef(*new IDBKeyRange(WTFMove(lower), WTFMove(upper), lowerType, upperType));
</ins><span class="cx">     }
</span><del>-    static Ref&lt;IDBKeyRange&gt; create(PassRefPtr&lt;IDBKey&gt; prpKey);
</del><ins>+    static Ref&lt;IDBKeyRange&gt; create(RefPtr&lt;IDBKey&gt;&amp;&amp;);
</ins><span class="cx">     ~IDBKeyRange() { }
</span><span class="cx"> 
</span><del>-    PassRefPtr&lt;IDBKey&gt; lower() const { return m_lower; }
-    PassRefPtr&lt;IDBKey&gt; upper() const { return m_upper; }
</del><ins>+    IDBKey* lower() const { return m_lower.get(); }
+    IDBKey* upper() const { return m_upper.get(); }
</ins><span class="cx"> 
</span><span class="cx">     Deprecated::ScriptValue lowerValue(ScriptExecutionContext*) const;
</span><span class="cx">     Deprecated::ScriptValue upperValue(ScriptExecutionContext*) const;
</span><span class="cx">     bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
</span><span class="cx">     bool upperOpen() const { return m_upperType == UpperBoundOpen; }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;IDBKeyRange&gt; only(PassRefPtr&lt;IDBKey&gt; value, ExceptionCode&amp;);
-    static PassRefPtr&lt;IDBKeyRange&gt; only(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
</del><ins>+    static RefPtr&lt;IDBKeyRange&gt; only(RefPtr&lt;IDBKey&gt;&amp;&amp; value, ExceptionCode&amp;);
+    static RefPtr&lt;IDBKeyRange&gt; only(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; key, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;IDBKeyRange&gt; lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; bound, ExceptionCode&amp; ec) { return lowerBound(context, bound, false, ec); }
-    static PassRefPtr&lt;IDBKeyRange&gt; lowerBound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; bound, bool open, ExceptionCode&amp;);
</del><ins>+    static RefPtr&lt;IDBKeyRange&gt; lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; bound, ExceptionCode&amp; ec) { return lowerBound(context, bound, false, ec); }
+    static RefPtr&lt;IDBKeyRange&gt; lowerBound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; bound, bool open, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;IDBKeyRange&gt; upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; bound, ExceptionCode&amp; ec) { return upperBound(context, bound, false, ec); }
-    static PassRefPtr&lt;IDBKeyRange&gt; upperBound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; bound, bool open, ExceptionCode&amp;);
</del><ins>+    static RefPtr&lt;IDBKeyRange&gt; upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; bound, ExceptionCode&amp; ec) { return upperBound(context, bound, false, ec); }
+    static RefPtr&lt;IDBKeyRange&gt; upperBound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; bound, bool open, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, ExceptionCode&amp; ec) { return bound(context, lower, upper, false, false, ec); }
-    static PassRefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, bool lowerOpen, ExceptionCode&amp; ec) { return bound(context, lower, upper, lowerOpen, false, ec); }
-    static PassRefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, bool lowerOpen, bool upperOpen, ExceptionCode&amp;);
</del><ins>+    static RefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, ExceptionCode&amp; ec) { return bound(context, lower, upper, false, false, ec); }
+    static RefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext* context, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, bool lowerOpen, ExceptionCode&amp; ec) { return bound(context, lower, upper, lowerOpen, false, ec); }
+    static RefPtr&lt;IDBKeyRange&gt; bound(ScriptExecutionContext*, const Deprecated::ScriptValue&amp; lower, const Deprecated::ScriptValue&amp; upper, bool lowerOpen, bool upperOpen, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool isOnlyKey() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    IDBKeyRange(PassRefPtr&lt;IDBKey&gt; lower, PassRefPtr&lt;IDBKey&gt; upper, LowerBoundType lowerType, UpperBoundType upperType);
</del><ins>+    IDBKeyRange(RefPtr&lt;IDBKey&gt;&amp;&amp; lower, RefPtr&lt;IDBKey&gt;&amp;&amp; upper, LowerBoundType lowerType, UpperBoundType upperType);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBKey&gt; m_lower;
</span><span class="cx">     RefPtr&lt;IDBKey&gt; m_upper;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;IDBKeyRange&gt; IDBKeyRangeData::maybeCreateIDBKeyRange() const
</del><ins>+RefPtr&lt;IDBKeyRange&gt; IDBKeyRangeData::maybeCreateIDBKeyRange() const
</ins><span class="cx"> {
</span><span class="cx">     if (isNull)
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.h        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -63,15 +63,15 @@
</span><span class="cx">         if (isNull)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        lowerKey = keyRange-&gt;lower().get();
-        upperKey = keyRange-&gt;upper().get();
</del><ins>+        lowerKey = keyRange-&gt;lower();
+        upperKey = keyRange-&gt;upper();
</ins><span class="cx">         lowerOpen = keyRange-&gt;lowerOpen();
</span><span class="cx">         upperOpen = keyRange-&gt;upperOpen();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IDBKeyRangeData isolatedCopy() const;
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT PassRefPtr&lt;IDBKeyRange&gt; maybeCreateIDBKeyRange() const;
</del><ins>+    WEBCORE_EXPORT RefPtr&lt;IDBKeyRange&gt; maybeCreateIDBKeyRange() const;
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool isExactlyOneKey() const;
</span><span class="cx">     bool containsKey(const IDBKeyData&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (197305 => 197306)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-02-29 01:44:26 UTC (rev 197305)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-02-29 01:57:41 UTC (rev 197306)
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     IDBKeyRange::UpperBoundType upperBoundType = upperOpen ? IDBKeyRange::UpperBoundOpen : IDBKeyRange::UpperBoundClosed;
</span><span class="cx"> 
</span><del>-    return IDBKeyRange::create(idbLower, idbUpper, lowerBoundType, upperBoundType);
</del><ins>+    return IDBKeyRange::create(WTFMove(idbLower), WTFMove(idbUpper), lowerBoundType, upperBoundType);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class DataLoader;
</span></span></pre>
</div>
</div>

</body>
</html>