<!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>[210275] 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/210275">210275</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2017-01-04 09:48:58 -0800 (Wed, 04 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove final custom binding from IDBRequest
https://bugs.webkit.org/show_bug.cgi?id=166671
Reviewed by Alex Christensen.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Remove JSIDBRequestCustom.cpp
* bindings/js/JSIDBRequestCustom.cpp: Removed.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::~IDBRequest):
(WebCore::IDBRequest::result):
(WebCore::IDBRequest::setSource):
(WebCore::IDBRequest::sourceObjectStoreIdentifier):
(WebCore::IDBRequest::sourceIndexIdentifier):
(WebCore::IDBRequest::requestedIndexRecordType):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::resultCursor):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::source): Deleted.
(WebCore::IDBRequest::clearResult): Deleted.
* Modules/indexeddb/IDBRequest.h:
(WebCore::IDBRequest::source):
(WebCore::IDBRequest::cursorResult): Deleted.
(WebCore::IDBRequest::databaseResult): Deleted.
(WebCore::IDBRequest::scriptResult): Deleted.
Replace multiple member variables with Variants for source and result. Add a result
member function that properly sets an exception if not "done".
* Modules/indexeddb/IDBRequest.idl:
Remove CustomGetter annotation and add type.
* bindings/generic/IDLTypes.h:
(WebCore::IDLAny::nullValue):
(WebCore::IDLAny::isNullValue):
(WebCore::IDLAny::extractValueFromNullable):
* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLAny>::convert):
Flesh out IDLAny to be implemented as a Strong<Unknown> when used in aggregate types,
but still work with JSValue when passing as a parameter.
* inspector/InspectorIndexedDBAgent.cpp:
Update for new return value of IDBRequest::result().</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequesth">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestidl">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericIDLTypesh">trunk/Source/WebCore/bindings/generic/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBRequestCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -1148,7 +1148,6 @@
</span><span class="cx"> bindings/js/JSIDBCursorWithValueCustom.cpp
</span><span class="cx"> bindings/js/JSIDBIndexCustom.cpp
</span><span class="cx"> bindings/js/JSIDBObjectStoreCustom.cpp
</span><del>- bindings/js/JSIDBRequestCustom.cpp
</del><span class="cx"> bindings/js/JSIDBTransactionCustom.cpp
</span><span class="cx"> bindings/js/JSImageDataCustom.cpp
</span><span class="cx"> bindings/js/JSInspectorFrontendHostCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/ChangeLog        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2017-01-03 Sam Weinig <sam@webkit.org>
+
+ Remove final custom binding from IDBRequest
+ https://bugs.webkit.org/show_bug.cgi?id=166671
+
+ Reviewed by Alex Christensen.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ Remove JSIDBRequestCustom.cpp
+
+ * bindings/js/JSIDBRequestCustom.cpp: Removed.
+
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::IDBRequest):
+ (WebCore::IDBRequest::~IDBRequest):
+ (WebCore::IDBRequest::result):
+ (WebCore::IDBRequest::setSource):
+ (WebCore::IDBRequest::sourceObjectStoreIdentifier):
+ (WebCore::IDBRequest::sourceIndexIdentifier):
+ (WebCore::IDBRequest::requestedIndexRecordType):
+ (WebCore::IDBRequest::setResult):
+ (WebCore::IDBRequest::setResultToStructuredClone):
+ (WebCore::IDBRequest::setResultToUndefined):
+ (WebCore::IDBRequest::resultCursor):
+ (WebCore::IDBRequest::willIterateCursor):
+ (WebCore::IDBRequest::didOpenOrIterateCursor):
+ (WebCore::IDBRequest::source): Deleted.
+ (WebCore::IDBRequest::clearResult): Deleted.
+ * Modules/indexeddb/IDBRequest.h:
+ (WebCore::IDBRequest::source):
+ (WebCore::IDBRequest::cursorResult): Deleted.
+ (WebCore::IDBRequest::databaseResult): Deleted.
+ (WebCore::IDBRequest::scriptResult): Deleted.
+ Replace multiple member variables with Variants for source and result. Add a result
+ member function that properly sets an exception if not "done".
+
+ * Modules/indexeddb/IDBRequest.idl:
+ Remove CustomGetter annotation and add type.
+
+ * bindings/generic/IDLTypes.h:
+ (WebCore::IDLAny::nullValue):
+ (WebCore::IDLAny::isNullValue):
+ (WebCore::IDLAny::extractValueFromNullable):
+ * bindings/js/JSDOMConvert.h:
+ (WebCore::Converter<IDLAny>::convert):
+ Flesh out IDLAny to be implemented as a Strong<Unknown> when used in aggregate types,
+ but still work with JSValue when passing as a parameter.
+
+ * inspector/InspectorIndexedDBAgent.cpp:
+ Update for new return value of IDBRequest::result().
+
</ins><span class="cx"> 2017-01-04 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Provide a setting for clients to always prefer low-power WebGL
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> : IDBActiveDOMObject(&context)
</span><span class="cx"> , m_transaction(&transaction)
</span><span class="cx"> , m_resourceIdentifier(transaction.connectionProxy())
</span><del>- , m_objectStoreSource(&objectStore)
</del><ins>+ , m_source(&objectStore)
</ins><span class="cx"> , m_connectionProxy(transaction.database().connectionProxy())
</span><span class="cx"> {
</span><span class="cx"> suspendIfNeeded();
</span><span class="lines">@@ -107,8 +107,7 @@
</span><span class="cx"> suspendIfNeeded();
</span><span class="cx">
</span><span class="cx"> WTF::switchOn(cursor.source(),
</span><del>- [this] (const RefPtr<IDBIndex>& index) { this->m_indexSource = index; },
- [this] (const RefPtr<IDBObjectStore>& objectStore) { this->m_objectStoreSource = objectStore; }
</del><ins>+ [this] (const auto& value) { this->m_source = IDBRequest::Source { value }; }
</ins><span class="cx"> );
</span><span class="cx">
</span><span class="cx"> cursor.setRequest(*this);
</span><span class="lines">@@ -118,7 +117,7 @@
</span><span class="cx"> : IDBActiveDOMObject(&context)
</span><span class="cx"> , m_transaction(&transaction)
</span><span class="cx"> , m_resourceIdentifier(transaction.connectionProxy())
</span><del>- , m_indexSource(&index)
</del><ins>+ , m_source(&index)
</ins><span class="cx"> , m_connectionProxy(transaction.database().connectionProxy())
</span><span class="cx"> {
</span><span class="cx"> suspendIfNeeded();
</span><span class="lines">@@ -128,7 +127,7 @@
</span><span class="cx"> : IDBActiveDOMObject(&context)
</span><span class="cx"> , m_transaction(&transaction)
</span><span class="cx"> , m_resourceIdentifier(transaction.connectionProxy())
</span><del>- , m_objectStoreSource(&objectStore)
</del><ins>+ , m_source(&objectStore)
</ins><span class="cx"> , m_requestedObjectStoreRecordType(type)
</span><span class="cx"> , m_connectionProxy(transaction.database().connectionProxy())
</span><span class="cx"> {
</span><span class="lines">@@ -145,10 +144,22 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx">
</span><del>- if (m_cursorResult)
- m_cursorResult->clearRequest();
</del><ins>+ if (m_result) {
+ WTF::switchOn(m_result.value(),
+ [] (RefPtr<IDBCursor>& cursor) { cursor->clearRequest(); },
+ [] (const auto&) { }
+ );
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ExceptionOr<std::optional<IDBRequest::Result>> IDBRequest::result() const
+{
+ if (!isDone())
+ return Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral("Failed to read the 'result' property from 'IDBRequest': The request has not finished.") };
+
+ return std::optional<IDBRequest::Result> { m_result };
+}
+
</ins><span class="cx"> ExceptionOr<DOMError*> IDBRequest::error() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="lines">@@ -159,29 +170,15 @@
</span><span class="cx"> return m_domError.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-std::optional<IDBRequest::Source> IDBRequest::source() const
-{
- if (m_cursorSource)
- return Source { m_cursorSource };
- if (m_indexSource)
- return Source { m_indexSource };
- if (m_objectStoreSource)
- return Source { m_objectStoreSource };
-
- return std::nullopt;
-}
-
</del><span class="cx"> void IDBRequest::setSource(IDBCursor& cursor)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx"> ASSERT(!m_cursorRequestNotifier);
</span><span class="cx">
</span><del>- m_objectStoreSource = nullptr;
- m_indexSource = nullptr;
- m_cursorSource = &cursor;
</del><ins>+ m_source = Source { &cursor };
</ins><span class="cx"> m_cursorRequestNotifier = std::make_unique<ScopeGuard>([this]() {
</span><del>- ASSERT(m_cursorSource);
- m_cursorSource->decrementOutstandingRequestCount();
</del><ins>+ ASSERT(WTF::holds_alternative<RefPtr<IDBCursor>>(m_source.value()));
+ WTF::get<RefPtr<IDBCursor>>(m_source.value())->decrementOutstandingRequestCount();
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -205,11 +202,14 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx">
</span><del>- if (m_objectStoreSource)
- return m_objectStoreSource->info().identifier();
- if (m_indexSource)
- return m_indexSource->info().objectStoreIdentifier();
- return 0;
</del><ins>+ if (!m_source)
+ return 0;
+
+ return WTF::switchOn(m_source.value(),
+ [] (const RefPtr<IDBObjectStore>& objectStore) { return objectStore->info().identifier(); },
+ [] (const RefPtr<IDBIndex>& index) { return index->info().objectStoreIdentifier(); },
+ [] (const RefPtr<IDBCursor>&) { return 0; }
+ );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> uint64_t IDBRequest::sourceIndexIdentifier() const
</span><span class="lines">@@ -216,9 +216,14 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx">
</span><del>- if (!m_indexSource)
</del><ins>+ if (!m_source)
</ins><span class="cx"> return 0;
</span><del>- return m_indexSource->info().identifier();
</del><ins>+
+ return WTF::switchOn(m_source.value(),
+ [] (const RefPtr<IDBObjectStore>&) -> uint64_t { return 0; },
+ [] (const RefPtr<IDBIndex>& index) -> uint64_t { return index->info().identifier(); },
+ [] (const RefPtr<IDBCursor>&) -> uint64_t { return 0; }
+ );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IndexedDB::ObjectStoreRecordType IDBRequest::requestedObjectStoreRecordType() const
</span><span class="lines">@@ -231,7 +236,8 @@
</span><span class="cx"> IndexedDB::IndexRecordType IDBRequest::requestedIndexRecordType() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><del>- ASSERT(m_indexSource);
</del><ins>+ ASSERT(m_source);
+ ASSERT(WTF::holds_alternative<RefPtr<IDBIndex>>(m_source.value()));
</ins><span class="cx">
</span><span class="cx"> return m_requestedIndexRecordType;
</span><span class="cx"> }
</span><span class="lines">@@ -362,8 +368,7 @@
</span><span class="cx"> if (!exec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
- m_scriptResult = { context->vm(), idbKeyDataToScriptValue(*exec, keyData) };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), idbKeyDataToScriptValue(*exec, keyData) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResult(const Vector<IDBKeyData>& keyDatas)
</span><span class="lines">@@ -378,10 +383,9 @@
</span><span class="cx"> if (!state)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
</del><span class="cx">
</span><span class="cx"> Locker<JSLock> locker(context->vm().apiLock());
</span><del>- m_scriptResult = { context->vm(), toJS(state, jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), keyDatas) };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), toJS(state, jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject()), keyDatas) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResult(const Vector<IDBValue>& values)
</span><span class="lines">@@ -396,10 +400,8 @@
</span><span class="cx"> if (!exec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
-
</del><span class="cx"> Locker<JSLock> locker(context->vm().apiLock());
</span><del>- m_scriptResult = { context->vm(), toJS(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), values) };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), toJS(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), values) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResult(uint64_t number)
</span><span class="lines">@@ -410,8 +412,7 @@
</span><span class="cx"> if (!context)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
- m_scriptResult = { context->vm(), JSC::jsNumber(number) };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), JSC::jsNumber(number) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResultToStructuredClone(const IDBValue& value)
</span><span class="lines">@@ -428,19 +429,9 @@
</span><span class="cx"> if (!exec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
- m_scriptResult = { context->vm(), deserializeIDBValueToJSValue(*exec, value) };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), deserializeIDBValueToJSValue(*exec, value) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBRequest::clearResult()
-{
- ASSERT(currentThread() == originThreadID());
-
- m_scriptResult = { };
- m_cursorResult = nullptr;
- m_databaseResult = nullptr;
-}
-
</del><span class="cx"> void IDBRequest::setResultToUndefined()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="lines">@@ -449,8 +440,7 @@
</span><span class="cx"> if (!context)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- clearResult();
- m_scriptResult = { context->vm(), JSC::jsUndefined() };
</del><ins>+ m_result = Result { JSC::Strong<JSC::Unknown> { context->vm(), JSC::jsUndefined() } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBCursor* IDBRequest::resultCursor()
</span><span class="lines">@@ -457,7 +447,13 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx">
</span><del>- return m_cursorResult.get();
</del><ins>+ if (!m_result)
+ return nullptr;
+
+ return WTF::switchOn(m_result.value(),
+ [] (const RefPtr<IDBCursor>& cursor) -> IDBCursor* { return cursor.get(); },
+ [] (const auto&) -> IDBCursor* { return nullptr; }
+ );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::willIterateCursor(IDBCursor& cursor)
</span><span class="lines">@@ -472,7 +468,7 @@
</span><span class="cx">
</span><span class="cx"> m_pendingCursor = &cursor;
</span><span class="cx"> m_hasPendingActivity = true;
</span><del>- clearResult();
</del><ins>+ m_result = std::nullopt;
</ins><span class="cx"> m_readyState = ReadyState::Pending;
</span><span class="cx"> m_domError = nullptr;
</span><span class="cx"> m_idbError = { };
</span><span class="lines">@@ -487,12 +483,12 @@
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx"> ASSERT(m_pendingCursor);
</span><span class="cx">
</span><del>- clearResult();
</del><ins>+ m_result = std::nullopt;
</ins><span class="cx">
</span><span class="cx"> if (resultData.type() == IDBResultType::IterateCursorSuccess || resultData.type() == IDBResultType::OpenCursorSuccess) {
</span><span class="cx"> m_pendingCursor->setGetResult(*this, resultData.getResult());
</span><span class="cx"> if (resultData.getResult().isDefined())
</span><del>- m_cursorResult = m_pendingCursor;
</del><ins>+ m_result = Result { m_pendingCursor };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_cursorRequestNotifier = nullptr;
</span><span class="lines">@@ -537,8 +533,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(currentThread() == originThreadID());
</span><span class="cx">
</span><del>- clearResult();
- m_databaseResult = WTFMove(database);
</del><ins>+ m_result = Result { RefPtr<IDBDatabase> { WTFMove(database) } };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -67,12 +67,11 @@
</span><span class="cx">
</span><span class="cx"> virtual ~IDBRequest();
</span><span class="cx">
</span><del>- IDBCursor* cursorResult() const { return m_cursorResult.get(); }
- IDBDatabase* databaseResult() const { return m_databaseResult.get(); }
- JSC::JSValue scriptResult() const { return m_scriptResult.get(); }
</del><ins>+ using Result = Variant<RefPtr<IDBCursor>, RefPtr<IDBDatabase>, JSC::Strong<JSC::Unknown>>;
+ ExceptionOr<std::optional<Result>> result() const;
</ins><span class="cx">
</span><span class="cx"> using Source = Variant<RefPtr<IDBObjectStore>, RefPtr<IDBIndex>, RefPtr<IDBCursor>>;
</span><del>- std::optional<Source> source() const;
</del><ins>+ const std::optional<Source>& source() const { return m_source; }
</ins><span class="cx">
</span><span class="cx"> ExceptionOr<DOMError*> error() const;
</span><span class="cx">
</span><span class="lines">@@ -141,8 +140,6 @@
</span><span class="cx"> IDBRequest(ScriptExecutionContext&, IDBObjectStore&, IndexedDB::ObjectStoreRecordType, IDBTransaction&);
</span><span class="cx"> IDBRequest(ScriptExecutionContext&, IDBIndex&, IndexedDB::IndexRecordType, IDBTransaction&);
</span><span class="cx">
</span><del>- void clearResult();
-
</del><span class="cx"> EventTargetInterface eventTargetInterface() const override;
</span><span class="cx">
</span><span class="cx"> const char* activeDOMObjectName() const final;
</span><span class="lines">@@ -161,18 +158,11 @@
</span><span class="cx">
</span><span class="cx"> IDBCursor* resultCursor();
</span><span class="cx">
</span><del>- // Could consider storing these three in a union or union-like class instead.
- JSC::Strong<JSC::Unknown> m_scriptResult;
- RefPtr<IDBCursor> m_cursorResult;
- RefPtr<IDBDatabase> m_databaseResult;
-
</del><span class="cx"> IDBError m_idbError;
</span><span class="cx"> IDBResourceIdentifier m_resourceIdentifier;
</span><span class="cx">
</span><del>- // Could consider storing these three in a union or union-like class instead.
- RefPtr<IDBObjectStore> m_objectStoreSource;
- RefPtr<IDBIndex> m_indexSource;
- RefPtr<IDBCursor> m_cursorSource;
</del><ins>+ std::optional<Result> m_result;
+ std::optional<Source> m_source;
</ins><span class="cx">
</span><span class="cx"> bool m_hasPendingActivity { true };
</span><span class="cx"> IndexedDB::ObjectStoreRecordType m_requestedObjectStoreRecordType { IndexedDB::ObjectStoreRecordType::ValueOnly };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> GenerateIsReachable=Impl,
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> ] interface IDBRequest : EventTarget {
</span><del>- [CustomGetter, GetterMayThrowException] readonly attribute any result;
</del><ins>+ [GetterMayThrowException] readonly attribute (IDBCursor or IDBDatabase or any)? result;
</ins><span class="cx"> [GetterMayThrowException] readonly attribute DOMError? error;
</span><span class="cx"> readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
</span><span class="cx"> readonly attribute IDBTransaction transaction;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -2898,7 +2898,6 @@
</span><span class="cx">                 7CD0BA051B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */; };
</span><span class="cx">                 7CD494CC1A86EB1D000A87EC /* RenderAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD494CA1A86EB1D000A87EC /* RenderAttachment.cpp */; };
</span><span class="cx">                 7CD494CD1A86EB1D000A87EC /* RenderAttachment.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                7CD686561E0E26D300E97AA7 /* JSIDBRequestCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CD686551E0E26D300E97AA7 /* JSIDBRequestCustom.cpp */; };
</del><span class="cx">                 7CE58D4A1DD64A5B00128552 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE58D491DD64A5B00128552 /* SVGPoint.h */; };
</span><span class="cx">                 7CE58D4E1DD694FE00128552 /* SVGRectTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE58D4D1DD694FE00128552 /* SVGRectTraits.h */; };
</span><span class="cx">                 7CE58D501DD69A1E00128552 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE58D4F1DD69A1E00128552 /* SVGNumber.h */; };
</span><span class="lines">@@ -10405,7 +10404,6 @@
</span><span class="cx">                 7CD0BA031B8F79C9005CEBBE /* ActiveDOMCallbackMicrotask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActiveDOMCallbackMicrotask.h; sourceTree = "<group>"; };
</span><span class="cx">                 7CD494CA1A86EB1D000A87EC /* RenderAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderAttachment.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderAttachment.h; sourceTree = "<group>"; };
</span><del>-                7CD686551E0E26D300E97AA7 /* JSIDBRequestCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBRequestCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 7CE58D491DD64A5B00128552 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = "<group>"; };
</span><span class="cx">                 7CE58D4D1DD694FE00128552 /* SVGRectTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectTraits.h; sourceTree = "<group>"; };
</span><span class="cx">                 7CE58D4F1DD69A1E00128552 /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -22133,7 +22131,6 @@
</span><span class="cx">                                 BC17F9650B64EBB8004A65CB /* JSHTMLSelectElementCustom.cpp */,
</span><span class="cx">                                 AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */,
</span><span class="cx">                                 D6F7960C166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp */,
</span><del>-                                7CD686551E0E26D300E97AA7 /* JSIDBRequestCustom.cpp */,
</del><span class="cx">                                 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */,
</span><span class="cx">                                 BCE1C43F0D9830F4003B02F2 /* JSLocationCustom.cpp */,
</span><span class="cx">                                 2D9BF7481DBFDDF8007A7D99 /* JSMediaKeySessionCustom.cpp */,
</span><span class="lines">@@ -31741,7 +31738,6 @@
</span><span class="cx">                                 49C7B9D91042D32F0009D447 /* WebGLRenderbuffer.cpp in Sources */,
</span><span class="cx">                                 49C7B9DF1042D32F0009D447 /* WebGLRenderingContext.cpp in Sources */,
</span><span class="cx">                                 D3F3D3691A69B7B00059FC2B /* WebGLRenderingContextBase.cpp in Sources */,
</span><del>-                                7CD686561E0E26D300E97AA7 /* JSIDBRequestCustom.cpp in Sources */,
</del><span class="cx">                                 6F995A211A7078B100A735F4 /* WebGLSampler.cpp in Sources */,
</span><span class="cx">                                 49C7B9E21042D32F0009D447 /* WebGLShader.cpp in Sources */,
</span><span class="cx">                                 A08CF154152B77B3009C5775 /* WebGLShaderPrecisionFormat.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/IDLTypes.h (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/IDLTypes.h        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/bindings/generic/IDLTypes.h        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><ins>+#include <heap/HandleTypes.h>
</ins><span class="cx"> #include <wtf/Brigand.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="lines">@@ -59,8 +60,15 @@
</span><span class="cx"> // IDLNull is a special type for use as a subtype in an IDLUnion that is nullable.
</span><span class="cx"> struct IDLNull : IDLType<std::nullptr_t> { };
</span><span class="cx">
</span><del>-struct IDLAny : IDLType<JSC::JSValue> { };
</del><ins>+struct IDLAny : IDLType<JSC::Strong<JSC::Unknown>> {
+ using ParameterType = JSC::JSValue;
</ins><span class="cx">
</span><ins>+ using NullableType = JSC::Strong<JSC::Unknown>;
+ static inline std::nullptr_t nullValue() { return nullptr; }
+ template<typename U> static inline bool isNullValue(U&& value) { return !value; }
+ template<typename U> static inline U&& extractValueFromNullable(U&& value) { return std::forward<U>(value); }
+};
+
</ins><span class="cx"> struct IDLBoolean : IDLType<bool> { };
</span><span class="cx">
</span><span class="cx"> template<typename NumericType> struct IDLNumber : IDLType<NumericType> { };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -214,10 +214,17 @@
</span><span class="cx"> // MARK: Any type
</span><span class="cx">
</span><span class="cx"> template<> struct Converter<IDLAny> : DefaultConverter<IDLAny> {
</span><ins>+ using ReturnType = JSC::JSValue;
+
</ins><span class="cx"> static JSC::JSValue convert(JSC::ExecState&, JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx"> return value;
</span><span class="cx"> }
</span><ins>+
+ static JSC::JSValue convert(const JSC::Strong<JSC::Unknown>& value)
+ {
+ return value.get();
+ }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<> struct JSConverter<IDLAny> {
</span><span class="lines">@@ -251,6 +258,11 @@
</span><span class="cx"> struct NullableConversionType<IDLInterface<T>> {
</span><span class="cx"> using Type = typename Converter<IDLInterface<T>>::ReturnType;
</span><span class="cx"> };
</span><ins>+
+ template<>
+ struct NullableConversionType<IDLAny> {
+ using Type = typename Converter<IDLAny>::ReturnType;
+ };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename T> struct Converter<IDLNullable<T>> : DefaultConverter<IDLNullable<T>> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBRequestCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSIDBRequest.h"
-
-#if ENABLE(INDEXED_DATABASE)
-
-#include "JSIDBCursor.h"
-#include "JSIDBDatabase.h"
-#include "JSIDBIndex.h"
-#include "JSIDBObjectStore.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSIDBRequest::result(ExecState& state) const
-{
- auto& request = wrapped();
-
- if (!request.isDone()) {
- auto& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- propagateException(state, scope, Exception { IDBDatabaseException::InvalidStateError, ASCIILiteral("Failed to read the 'result' property from 'IDBRequest': The request has not finished.") });
- return { };
- }
-
- if (auto* cursor = request.cursorResult())
- return toJS(&state, globalObject(), *cursor);
- if (auto* database = request.databaseResult())
- return toJS(&state, globalObject(), *database);
- if (auto result = request.scriptResult())
- return result;
- return jsNull();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INDEXED_DATABASE)
</del></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (210274 => 210275)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2017-01-04 13:59:44 UTC (rev 210274)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2017-01-04 17:48:58 UTC (rev 210275)
</span><span class="lines">@@ -123,17 +123,20 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& request = static_cast<IDBOpenDBRequest&>(*event->target());
</span><del>- if (!request.isDone()) {
</del><ins>+
+ auto result = request.result();
+ if (result.hasException()) {
</ins><span class="cx"> m_executableWithDatabase->requestCallback().sendFailure("Could not get result in callback.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto databaseResult = request.databaseResult();
- if (!databaseResult) {
</del><ins>+ auto resultValue = result.releaseReturnValue();
+ if (!resultValue || !WTF::holds_alternative<RefPtr<IDBDatabase>>(resultValue.value())) {
</ins><span class="cx"> m_executableWithDatabase->requestCallback().sendFailure("Unexpected result type.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ auto databaseResult = WTF::get<RefPtr<IDBDatabase>>(resultValue.value());
</ins><span class="cx"> m_executableWithDatabase->execute(*databaseResult);
</span><span class="cx"> databaseResult->close();
</span><span class="cx"> }
</span><span class="lines">@@ -362,26 +365,23 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& request = static_cast<IDBRequest&>(*event->target());
</span><del>- if (!request.isDone()) {
</del><ins>+
+ auto result = request.result();
+ if (result.hasException()) {
</ins><span class="cx"> m_requestCallback->sendFailure("Could not get result in callback.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (request.scriptResult()) {
</del><ins>+ auto resultValue = result.releaseReturnValue();
+ if (!resultValue || !WTF::holds_alternative<RefPtr<IDBCursor>>(resultValue.value())) {
</ins><span class="cx"> end(false);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>-
- auto* cursorResult = request.cursorResult();
- if (!cursorResult) {
- end(false);
- return;
- }
</del><span class="cx">
</span><del>- auto& cursor = *cursorResult;
</del><ins>+ auto cursor = WTF::get<RefPtr<IDBCursor>>(resultValue.value());
</ins><span class="cx">
</span><span class="cx"> if (m_skipCount) {
</span><del>- if (cursor.advance(m_skipCount).hasException())
</del><ins>+ if (cursor->advance(m_skipCount).hasException())
</ins><span class="cx"> m_requestCallback->sendFailure("Could not advance cursor.");
</span><span class="cx"> m_skipCount = 0;
</span><span class="cx"> return;
</span><span class="lines">@@ -393,7 +393,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Continue cursor before making injected script calls, otherwise transaction might be finished.
</span><del>- if (cursor.continueFunction(nullptr).hasException()) {
</del><ins>+ if (cursor->continueFunction(nullptr).hasException()) {
</ins><span class="cx"> m_requestCallback->sendFailure("Could not continue cursor.");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -403,9 +403,9 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto dataEntry = DataEntry::create()
</span><del>- .setKey(m_injectedScript.wrapObject(cursor.key(), String(), true))
- .setPrimaryKey(m_injectedScript.wrapObject(cursor.primaryKey(), String(), true))
- .setValue(m_injectedScript.wrapObject(cursor.value(), String(), true))
</del><ins>+ .setKey(m_injectedScript.wrapObject(cursor->key(), String(), true))
+ .setPrimaryKey(m_injectedScript.wrapObject(cursor->primaryKey(), String(), true))
+ .setValue(m_injectedScript.wrapObject(cursor->value(), String(), true))
</ins><span class="cx"> .release();
</span><span class="cx"> m_result->addItem(WTFMove(dataEntry));
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>