<!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 <gyuyoung.kim@webkit.org>
+
+ 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 <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Switch to application/vnd.apple.folder for <attachment> 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<IDBDatabaseError> {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<IDBDatabaseError> create(unsigned short code)
</del><ins>+ static Ref<IDBDatabaseError> create(unsigned short code)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(code >= IDBDatabaseException::IDBDatabaseExceptionOffset);
</span><span class="cx"> ASSERT(code < 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<IDBDatabaseError> create(unsigned short code, const String& message)
</del><ins>+ static Ref<IDBDatabaseError> create(unsigned short code, const String& message)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_WITH_MESSAGE(code >= IDBDatabaseException::IDBDatabaseExceptionOffset, "%d >= %d", code, IDBDatabaseException::IDBDatabaseExceptionOffset);
</span><span class="cx"> ASSERT(code < 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<IDBKey> IDBKeyData::maybeCreateIDBKey() const
</del><ins>+RefPtr<IDBKey> 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<IDBKey> maybeCreateIDBKey() const;
</del><ins>+ WEBCORE_EXPORT RefPtr<IDBKey> 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<IDBKeyRange> IDBKeyRange::create(PassRefPtr<IDBKey> prpKey)
</del><ins>+Ref<IDBKeyRange> IDBKeyRange::create(RefPtr<IDBKey>&& key)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKey> key = prpKey;
- return adoptRef(*new IDBKeyRange(key, key, LowerBoundClosed, UpperBoundClosed));
</del><ins>+ RefPtr<IDBKey> 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<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType)
- : m_lower(lower)
- , m_upper(upper)
</del><ins>+IDBKeyRange::IDBKeyRange(RefPtr<IDBKey>&& lower, RefPtr<IDBKey>&& 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(&requestState, m_upper);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<IDBKeyRange> IDBKeyRange::only(PassRefPtr<IDBKey> prpKey, ExceptionCode& ec)
</del><ins>+RefPtr<IDBKeyRange> IDBKeyRange::only(RefPtr<IDBKey>&& key, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- RefPtr<IDBKey> key = prpKey;
</del><span class="cx"> if (!key || !key->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<IDBKeyRange> IDBKeyRange::only(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</del><ins>+RefPtr<IDBKeyRange> IDBKeyRange::only(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
</span><span class="cx"> if (!key || !key->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<IDBKeyRange> IDBKeyRange::lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</del><ins>+RefPtr<IDBKeyRange> IDBKeyRange::lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
</span><span class="cx"> if (!bound || !bound->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<IDBKeyRange> IDBKeyRange::upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</del><ins>+RefPtr<IDBKeyRange> IDBKeyRange::upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
</span><span class="cx"> if (!bound || !bound->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<IDBKeyRange> IDBKeyRange::bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lowerValue, const Deprecated::ScriptValue& upperValue, bool lowerOpen, bool upperOpen, ExceptionCode& ec)
</del><ins>+RefPtr<IDBKeyRange> IDBKeyRange::bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lowerValue, const Deprecated::ScriptValue& upperValue, bool lowerOpen, bool upperOpen, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> DOMRequestState requestState(context);
</span><span class="cx"> RefPtr<IDBKey> lower = scriptValueToIDBKey(&requestState, lowerValue);
</span><span class="lines">@@ -116,18 +115,18 @@
</span><span class="cx">
</span><span class="cx"> if (!lower || !lower->isValid() || !upper || !upper->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->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->isEqual(lower.get()) && (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 "Dictionary.h"
</span><span class="cx"> #include "IDBKey.h"
</span><span class="cx"> #include "ScriptWrappable.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</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<IDBKeyRange> create(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType)
</del><ins>+ static Ref<IDBKeyRange> create(RefPtr<IDBKey>&& lower, RefPtr<IDBKey>&& 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<IDBKeyRange> create(PassRefPtr<IDBKey> prpKey);
</del><ins>+ static Ref<IDBKeyRange> create(RefPtr<IDBKey>&&);
</ins><span class="cx"> ~IDBKeyRange() { }
</span><span class="cx">
</span><del>- PassRefPtr<IDBKey> lower() const { return m_lower; }
- PassRefPtr<IDBKey> 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<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionCode&);
- static PassRefPtr<IDBKeyRange> only(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
</del><ins>+ static RefPtr<IDBKeyRange> only(RefPtr<IDBKey>&& value, ExceptionCode&);
+ static RefPtr<IDBKeyRange> only(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
</ins><span class="cx">
</span><del>- static PassRefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& bound, ExceptionCode& ec) { return lowerBound(context, bound, false, ec); }
- static PassRefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext*, const Deprecated::ScriptValue& bound, bool open, ExceptionCode&);
</del><ins>+ static RefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& bound, ExceptionCode& ec) { return lowerBound(context, bound, false, ec); }
+ static RefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext*, const Deprecated::ScriptValue& bound, bool open, ExceptionCode&);
</ins><span class="cx">
</span><del>- static PassRefPtr<IDBKeyRange> upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& bound, ExceptionCode& ec) { return upperBound(context, bound, false, ec); }
- static PassRefPtr<IDBKeyRange> upperBound(ScriptExecutionContext*, const Deprecated::ScriptValue& bound, bool open, ExceptionCode&);
</del><ins>+ static RefPtr<IDBKeyRange> upperBound(ScriptExecutionContext* context, const Deprecated::ScriptValue& bound, ExceptionCode& ec) { return upperBound(context, bound, false, ec); }
+ static RefPtr<IDBKeyRange> upperBound(ScriptExecutionContext*, const Deprecated::ScriptValue& bound, bool open, ExceptionCode&);
</ins><span class="cx">
</span><del>- static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, ExceptionCode& ec) { return bound(context, lower, upper, false, false, ec); }
- static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, bool lowerOpen, ExceptionCode& ec) { return bound(context, lower, upper, lowerOpen, false, ec); }
- static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext*, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionCode&);
</del><ins>+ static RefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, ExceptionCode& ec) { return bound(context, lower, upper, false, false, ec); }
+ static RefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, bool lowerOpen, ExceptionCode& ec) { return bound(context, lower, upper, lowerOpen, false, ec); }
+ static RefPtr<IDBKeyRange> bound(ScriptExecutionContext*, const Deprecated::ScriptValue& lower, const Deprecated::ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionCode&);
</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<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundType lowerType, UpperBoundType upperType);
</del><ins>+ IDBKeyRange(RefPtr<IDBKey>&& lower, RefPtr<IDBKey>&& upper, LowerBoundType lowerType, UpperBoundType upperType);
</ins><span class="cx">
</span><span class="cx"> RefPtr<IDBKey> m_lower;
</span><span class="cx"> RefPtr<IDBKey> 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<IDBKeyRange> IDBKeyRangeData::maybeCreateIDBKeyRange() const
</del><ins>+RefPtr<IDBKeyRange> 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->lower().get();
- upperKey = keyRange->upper().get();
</del><ins>+ lowerKey = keyRange->lower();
+ upperKey = keyRange->upper();
</ins><span class="cx"> lowerOpen = keyRange->lowerOpen();
</span><span class="cx"> upperOpen = keyRange->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<IDBKeyRange> maybeCreateIDBKeyRange() const;
</del><ins>+ WEBCORE_EXPORT RefPtr<IDBKeyRange> maybeCreateIDBKeyRange() const;
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool isExactlyOneKey() const;
</span><span class="cx"> bool containsKey(const IDBKeyData&) 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>