<!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>[199310] 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/199310">199310</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-11 14:31:53 -0700 (Mon, 11 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Clean up IDBBindingUtilities.
https://bugs.webkit.org/show_bug.cgi?id=156472
Reviewed by Alex Christensen.
No new tests (No change in behavior).
- Get rid of a whole bunch of unused functions (since we got rid of Legacy IDB).
- Make more functions deal in ExecState/ScriptExecutionContexts instead of DOMRequestState.
- Make more functions deal in JSValue instead of Deprecated::ScriptValue.
* bindings/scripts/IDLAttributes.txt: Add a new attribute to signify that an implementation returns
JSValues instead of Deprecated::ScriptState
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Use that new attribute.
* Modules/indexeddb/IDBAny.cpp:
(WebCore::IDBAny::IDBAny):
(WebCore::IDBAny::scriptValue):
* Modules/indexeddb/IDBAny.h:
(WebCore::IDBAny::create):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::lowerValue):
(WebCore::IDBKeyRange::upperValue):
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRange.h:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::count):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue):
(WebCore::deserializeIDBValueDataToJSValue):
(WebCore::scriptValueToIDBKey):
(WebCore::idbKeyDataToScriptValue):
(WebCore::idbKeyDataToJSValue): Deleted.
(WebCore::injectIDBKeyIntoScriptValue): Deleted.
(WebCore::createIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
(WebCore::deserializeIDBValue): Deleted.
(WebCore::deserializeIDBValueData): Deleted.
(WebCore::deserializeIDBValueBuffer): Deleted.
(WebCore::idbValueDataToJSValue): Deleted.
(WebCore::idbKeyToScriptValue): Deleted.
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::createIndex):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::execState):
* dom/ScriptExecutionContext.h:
* inspector/InspectorIndexedDBAgent.cpp:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBAnycpp">trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBAnyh">trunk/Source/WebCore/Modules/indexeddb/IDBAny.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursoridl">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorWithValueidl">trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</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="#trunkSourceWebCoreModulesindexeddbIDBKeyRangeidl">trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiesh">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBAnyCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCoredomScriptExecutionContextcpp">trunk/Source/WebCore/dom/ScriptExecutionContext.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptExecutionContexth">trunk/Source/WebCore/dom/ScriptExecutionContext.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 (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/ChangeLog        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -1,3 +1,89 @@
</span><ins>+2016-04-11 Brady Eidson <beidson@apple.com>
+
+ Clean up IDBBindingUtilities.
+ https://bugs.webkit.org/show_bug.cgi?id=156472
+
+ Reviewed by Alex Christensen.
+
+ No new tests (No change in behavior).
+
+ - Get rid of a whole bunch of unused functions (since we got rid of Legacy IDB).
+ - Make more functions deal in ExecState/ScriptExecutionContexts instead of DOMRequestState.
+ - Make more functions deal in JSValue instead of Deprecated::ScriptValue.
+
+ * bindings/scripts/IDLAttributes.txt: Add a new attribute to signify that an implementation returns
+ JSValues instead of Deprecated::ScriptState
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (NativeToJSValue): Use that new attribute.
+
+ * Modules/indexeddb/IDBAny.cpp:
+ (WebCore::IDBAny::IDBAny):
+ (WebCore::IDBAny::scriptValue):
+ * Modules/indexeddb/IDBAny.h:
+ (WebCore::IDBAny::create):
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::key):
+ (WebCore::IDBCursor::primaryKey):
+ (WebCore::IDBCursor::value):
+ (WebCore::IDBCursor::update):
+ (WebCore::IDBCursor::continueFunction):
+ (WebCore::IDBCursor::deleteFunction):
+ (WebCore::IDBCursor::setGetResult):
+ * Modules/indexeddb/IDBCursor.h:
+ * Modules/indexeddb/IDBCursor.idl:
+ * Modules/indexeddb/IDBCursorWithValue.idl:
+ * Modules/indexeddb/IDBFactory.cpp:
+ (WebCore::IDBFactory::cmp):
+ * Modules/indexeddb/IDBIndex.cpp:
+ (WebCore::IDBIndex::count):
+ (WebCore::IDBIndex::get):
+ (WebCore::IDBIndex::getKey):
+ * Modules/indexeddb/IDBKeyRange.cpp:
+ (WebCore::IDBKeyRange::lowerValue):
+ (WebCore::IDBKeyRange::upperValue):
+ (WebCore::IDBKeyRange::only):
+ (WebCore::IDBKeyRange::lowerBound):
+ (WebCore::IDBKeyRange::upperBound):
+ (WebCore::IDBKeyRange::bound):
+ * Modules/indexeddb/IDBKeyRange.h:
+ * Modules/indexeddb/IDBKeyRange.idl:
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::get):
+ (WebCore::IDBObjectStore::modernDelete):
+ (WebCore::IDBObjectStore::count):
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::setResult):
+ (WebCore::IDBRequest::setResultToStructuredClone):
+ * Modules/indexeddb/server/MemoryObjectStore.cpp:
+ (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
+ (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
+ * bindings/js/IDBBindingUtilities.cpp:
+ (WebCore::idbKeyPathFromValue):
+ (WebCore::deserializeIDBValueDataToJSValue):
+ (WebCore::scriptValueToIDBKey):
+ (WebCore::idbKeyDataToScriptValue):
+ (WebCore::idbKeyDataToJSValue): Deleted.
+ (WebCore::injectIDBKeyIntoScriptValue): Deleted.
+ (WebCore::createIDBKeyFromScriptValueAndKeyPath): Deleted.
+ (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
+ (WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
+ (WebCore::deserializeIDBValue): Deleted.
+ (WebCore::deserializeIDBValueData): Deleted.
+ (WebCore::deserializeIDBValueBuffer): Deleted.
+ (WebCore::idbValueDataToJSValue): Deleted.
+ (WebCore::idbKeyToScriptValue): Deleted.
+ * bindings/js/IDBBindingUtilities.h:
+ * bindings/js/JSIDBAnyCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSIDBDatabaseCustom.cpp:
+ (WebCore::JSIDBDatabase::createObjectStore):
+ * bindings/js/JSIDBObjectStoreCustom.cpp:
+ (WebCore::JSIDBObjectStore::createIndex):
+ * dom/ScriptExecutionContext.cpp:
+ (WebCore::ScriptExecutionContext::execState):
+ * dom/ScriptExecutionContext.h:
+ * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2016-04-09 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> WebKit should adopt journal_mode=wal for all SQLite databases.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IDBAny::IDBAny(const Deprecated::ScriptValue& value)
</del><ins>+IDBAny::IDBAny(const JSC::JSValue& value)
</ins><span class="cx"> : m_type(IDBAny::Type::ScriptValue)
</span><span class="cx"> , m_scriptValue(value)
</span><span class="cx"> {
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const Deprecated::ScriptValue& IDBAny::scriptValue()
</del><ins>+JSC::JSValue IDBAny::scriptValue()
</ins><span class="cx"> {
</span><span class="cx"> return m_scriptValue;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "IDBKeyPath.h"
</span><span class="cx"> #include "ScriptWrappable.h"
</span><del>-#include <bindings/ScriptValue.h>
</del><ins>+#include <runtime/JSCJSValue.h>
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> return adoptRef(new IDBAny(keyPath));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- static RefPtr<IDBAny> create(const Deprecated::ScriptValue& value)
</del><ins>+ static RefPtr<IDBAny> create(const JSC::JSValue& value)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(new IDBAny(value));
</span><span class="cx"> }
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> RefPtr<IDBIndex> idbIndex();
</span><span class="cx"> RefPtr<IDBObjectStore> idbObjectStore();
</span><span class="cx"> RefPtr<IDBTransaction> idbTransaction();
</span><del>- const Deprecated::ScriptValue& scriptValue();
</del><ins>+ JSC::JSValue scriptValue();
</ins><span class="cx"> int64_t integer();
</span><span class="cx"> const String& string();
</span><span class="cx"> const IDBKeyPath& keyPath();
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> explicit IDBAny(Ref<IDBIndex>&&);
</span><span class="cx"> explicit IDBAny(Ref<IDBCursor>&&);
</span><span class="cx"> explicit IDBAny(const IDBKeyPath&);
</span><del>- explicit IDBAny(const Deprecated::ScriptValue&);
</del><ins>+ explicit IDBAny(const JSC::JSValue&);
</ins><span class="cx">
</span><span class="cx"> IDBAny::Type m_type { IDBAny::Type::Undefined };
</span><span class="cx"> RefPtr<IDBDatabase> m_database;
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> RefPtr<IDBCursorWithValue> m_cursorWithValue;
</span><span class="cx">
</span><span class="cx"> const IDBKeyPath m_idbKeyPath;
</span><del>- const Deprecated::ScriptValue m_scriptValue;
</del><ins>+ const JSC::JSValue m_scriptValue;
</ins><span class="cx"> const String m_string;
</span><span class="cx"> const int64_t m_integer { 0 };
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -40,6 +40,8 @@
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><ins>+using namespace JSC;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> const AtomicString& IDBCursor::directionNext()
</span><span class="lines">@@ -157,19 +159,19 @@
</span><span class="cx"> return IDBCursor::directionToString(m_info.cursorDirection());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const Deprecated::ScriptValue& IDBCursor::key() const
</del><ins>+JSValue IDBCursor::key(ExecState&) const
</ins><span class="cx"> {
</span><del>- return m_deprecatedCurrentKey;
</del><ins>+ return m_currentKey;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-const Deprecated::ScriptValue& IDBCursor::primaryKey() const
</del><ins>+JSValue IDBCursor::primaryKey(ExecState&) const
</ins><span class="cx"> {
</span><del>- return m_deprecatedCurrentPrimaryKey;
</del><ins>+ return m_currentPrimaryKey;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-const Deprecated::ScriptValue& IDBCursor::value() const
</del><ins>+JSValue IDBCursor::value(ExecState&) const
</ins><span class="cx"> {
</span><del>- return m_deprecatedCurrentValue;
</del><ins>+ return m_currentValue;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBAny* IDBCursor::source()
</span><span class="lines">@@ -224,7 +226,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_deprecatedCurrentPrimaryKey.jsValue(), ec);
</del><ins>+ auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_currentPrimaryKey, ec);
</ins><span class="cx"> if (ec.code)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -280,10 +282,9 @@
</span><span class="cx">
</span><span class="cx"> void IDBCursor::continueFunction(ScriptExecutionContext& context, const Deprecated::ScriptValue& keyValue, ExceptionCodeWithMessage& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
</del><span class="cx"> RefPtr<IDBKey> key;
</span><span class="cx"> if (!keyValue.jsValue().isUndefined())
</span><del>- key = scriptValueToIDBKey(&requestState, keyValue);
</del><ins>+ key = scriptValueToIDBKey(context, keyValue);
</ins><span class="cx">
</span><span class="cx"> continueFunction(key.get(), ec);
</span><span class="cx"> }
</span><span class="lines">@@ -380,7 +381,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto request = effectiveObjectStore().modernDelete(context, m_deprecatedCurrentPrimaryKey.jsValue(), ec);
</del><ins>+ auto request = effectiveObjectStore().modernDelete(context, m_currentPrimaryKey, ec);
</ins><span class="cx"> if (ec.code)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -400,25 +401,25 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!getResult.isDefined()) {
</span><del>- m_deprecatedCurrentKey = { };
</del><ins>+ m_currentKey = { };
</ins><span class="cx"> m_currentKeyData = { };
</span><del>- m_deprecatedCurrentPrimaryKey = { };
</del><ins>+ m_currentPrimaryKey = { };
</ins><span class="cx"> m_currentPrimaryKeyData = { };
</span><del>- m_deprecatedCurrentValue = { };
</del><ins>+ m_currentValue = { };
</ins><span class="cx">
</span><span class="cx"> m_gotValue = false;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
</del><ins>+ m_currentKey = idbKeyDataToScriptValue(*context, getResult.keyData());
</ins><span class="cx"> m_currentKeyData = getResult.keyData();
</span><del>- m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
</del><ins>+ m_currentPrimaryKey = idbKeyDataToScriptValue(*context, getResult.primaryKeyData());
</ins><span class="cx"> m_currentPrimaryKeyData = getResult.primaryKeyData();
</span><span class="cx">
</span><span class="cx"> if (isKeyCursor())
</span><del>- m_deprecatedCurrentValue = { };
</del><ins>+ m_currentValue = { };
</ins><span class="cx"> else
</span><del>- m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.value().data());
</del><ins>+ m_currentValue = deserializeIDBValueDataToJSValue(*context, getResult.value().data());
</ins><span class="cx">
</span><span class="cx"> m_gotValue = true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "IDBAny.h"
</span><span class="cx"> #include "IDBCursorInfo.h"
</span><ins>+#include <runtime/JSCJSValue.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -56,9 +57,9 @@
</span><span class="cx">
</span><span class="cx"> // Implement the IDL
</span><span class="cx"> const String& direction() const;
</span><del>- const Deprecated::ScriptValue& key() const;
- const Deprecated::ScriptValue& primaryKey() const;
- const Deprecated::ScriptValue& value() const;
</del><ins>+ JSC::JSValue key(JSC::ExecState&) const;
+ JSC::JSValue primaryKey(JSC::ExecState&) const;
+ JSC::JSValue value(JSC::ExecState&) const;
</ins><span class="cx"> IDBAny* source();
</span><span class="cx">
</span><span class="cx"> RefPtr<WebCore::IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCodeWithMessage&);
</span><span class="lines">@@ -111,11 +112,9 @@
</span><span class="cx"> IDBKeyData m_currentKeyData;
</span><span class="cx"> IDBKeyData m_currentPrimaryKeyData;
</span><span class="cx">
</span><del>- // FIXME: When ditching Legacy IDB and combining this implementation with the abstract IDBCursor,
- // these Deprecated::ScriptValue members should be JSValues instead.
- Deprecated::ScriptValue m_deprecatedCurrentKey;
- Deprecated::ScriptValue m_deprecatedCurrentPrimaryKey;
- Deprecated::ScriptValue m_deprecatedCurrentValue;
</del><ins>+ JSC::JSValue m_currentKey;
+ JSC::JSValue m_currentPrimaryKey;
+ JSC::JSValue m_currentValue;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> ] interface IDBCursor {
</span><span class="cx"> readonly attribute IDBAny source;
</span><span class="cx"> readonly attribute DOMString direction;
</span><del>- readonly attribute any key;
- readonly attribute any primaryKey;
</del><ins>+ [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any key;
+ [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any primaryKey;
</ins><span class="cx">
</span><span class="cx"> [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest update(any value);
</span><span class="cx"> [RaisesExceptionWithMessage] void advance([EnforceRange] unsigned long count);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValueidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -30,5 +30,5 @@
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> JSCustomMarkFunction,
</span><span class="cx"> ] interface IDBCursorWithValue : IDBCursor {
</span><del>- readonly attribute any value;
</del><ins>+ [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any value;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -149,9 +149,8 @@
</span><span class="cx">
</span><span class="cx"> short IDBFactory::cmp(ScriptExecutionContext& context, const Deprecated::ScriptValue& firstValue, const Deprecated::ScriptValue& secondValue, ExceptionCodeWithMessage& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> first = scriptValueToIDBKey(&requestState, firstValue);
- RefPtr<IDBKey> second = scriptValueToIDBKey(&requestState, secondValue);
</del><ins>+ RefPtr<IDBKey> first = scriptValueToIDBKey(context, firstValue);
+ RefPtr<IDBKey> second = scriptValueToIDBKey(context, secondValue);
</ins><span class="cx">
</span><span class="cx"> ASSERT(first);
</span><span class="cx"> ASSERT(second);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -160,8 +160,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::count");
</span><span class="cx">
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.");
</span><span class="lines">@@ -242,8 +241,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::get");
</span><span class="cx">
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.");
</span><span class="lines">@@ -287,8 +285,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBIndex::getKey");
</span><span class="cx">
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -30,9 +30,12 @@
</span><span class="cx"> #include "IDBBindingUtilities.h"
</span><span class="cx"> #include "IDBDatabaseException.h"
</span><span class="cx"> #include "IDBKey.h"
</span><ins>+#include "IDBKeyData.h"
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+using namespace JSC;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> Ref<IDBKeyRange> IDBKeyRange::create(RefPtr<IDBKey>&& key)
</span><span class="lines">@@ -49,16 +52,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue IDBKeyRange::lowerValue(ScriptExecutionContext& context) const
</del><ins>+JSValue IDBKeyRange::lowerValue(ScriptExecutionContext& context) const
</ins><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- return idbKeyToScriptValue(&requestState, m_lower);
</del><ins>+ return idbKeyDataToScriptValue(context, IDBKeyData(m_lower.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue IDBKeyRange::upperValue(ScriptExecutionContext& context) const
</del><ins>+JSValue IDBKeyRange::upperValue(ScriptExecutionContext& context) const
</ins><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- return idbKeyToScriptValue(&requestState, m_upper);
</del><ins>+ return idbKeyDataToScriptValue(context, IDBKeyData(m_upper.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKeyRange> IDBKeyRange::only(RefPtr<IDBKey>&& key, ExceptionCode& ec)
</span><span class="lines">@@ -73,8 +74,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKeyRange> IDBKeyRange::only(ScriptExecutionContext& context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
</del><ins>+ RefPtr<IDBKey> key = scriptValueToIDBKey(context, keyValue);
</ins><span class="cx"> if (!key || !key->isValid()) {
</span><span class="cx"> ec = IDBDatabaseException::DataError;
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -85,8 +85,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKeyRange> IDBKeyRange::lowerBound(ScriptExecutionContext& context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
</del><ins>+ RefPtr<IDBKey> bound = scriptValueToIDBKey(context, boundValue);
</ins><span class="cx"> if (!bound || !bound->isValid()) {
</span><span class="cx"> ec = IDBDatabaseException::DataError;
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -97,8 +96,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKeyRange> IDBKeyRange::upperBound(ScriptExecutionContext& context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
</del><ins>+ RefPtr<IDBKey> bound = scriptValueToIDBKey(context, boundValue);
</ins><span class="cx"> if (!bound || !bound->isValid()) {
</span><span class="cx"> ec = IDBDatabaseException::DataError;
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -109,9 +107,8 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBKeyRange> IDBKeyRange::bound(ScriptExecutionContext& context, const Deprecated::ScriptValue& lowerValue, const Deprecated::ScriptValue& upperValue, bool lowerOpen, bool upperOpen, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> lower = scriptValueToIDBKey(&requestState, lowerValue);
- RefPtr<IDBKey> upper = scriptValueToIDBKey(&requestState, upperValue);
</del><ins>+ RefPtr<IDBKey> lower = scriptValueToIDBKey(context, lowerValue);
+ RefPtr<IDBKey> upper = scriptValueToIDBKey(context, upperValue);
</ins><span class="cx">
</span><span class="cx"> if (!lower || !lower->isValid() || !upper || !upper->isValid()) {
</span><span class="cx"> ec = IDBDatabaseException::DataError;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx"> IDBKey* lower() const { return m_lower.get(); }
</span><span class="cx"> IDBKey* upper() const { return m_upper.get(); }
</span><span class="cx">
</span><del>- Deprecated::ScriptValue lowerValue(ScriptExecutionContext&) const;
- Deprecated::ScriptValue upperValue(ScriptExecutionContext&) const;
</del><ins>+ JSC::JSValue lowerValue(ScriptExecutionContext&) const;
+ JSC::JSValue upperValue(ScriptExecutionContext&) const;
</ins><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></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> EnabledAtRuntime=IndexedDB,
</span><span class="cx"> ] interface IDBKeyRange {
</span><del>- [ImplementedAs=lowerValue,CallWith=ScriptExecutionContext] readonly attribute any lower;
- [ImplementedAs=upperValue,CallWith=ScriptExecutionContext] readonly attribute any upper;
</del><ins>+ [ImplementedAs=lowerValue, CallWith=ScriptExecutionContext, ImplementationReturnType=JSValue] readonly attribute any lower;
+ [ImplementedAs=upperValue, CallWith=ScriptExecutionContext, ImplementationReturnType=JSValue] readonly attribute any upper;
</ins><span class="cx"> readonly attribute boolean lowerOpen;
</span><span class="cx"> readonly attribute boolean upperOpen;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -182,8 +182,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.");
</span><span class="lines">@@ -399,8 +398,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<IDBRequest> IDBObjectStore::modernDelete(ScriptExecutionContext& context, JSC::JSValue key, ExceptionCodeWithMessage& ec)
</span><span class="cx"> {
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.");
</span><span class="lines">@@ -594,8 +592,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "IDBObjectStore::count");
</span><span class="cx">
</span><del>- DOMRequestState requestState(&context);
- RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
</del><ins>+ RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx"> if (!idbKey || idbKey->type() == KeyType::Invalid) {
</span><span class="cx"> ec.code = IDBDatabaseException::DataError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.");
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -326,13 +326,13 @@
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResult(const IDBKeyData* keyData)
</span><span class="cx"> {
</span><del>- if (!keyData) {
</del><ins>+ auto* context = scriptExecutionContext();
+ if (!context || !keyData) {
</ins><span class="cx"> m_result = nullptr;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Deprecated::ScriptValue value = idbKeyDataToScriptValue(scriptExecutionContext(), *keyData);
- m_result = IDBAny::create(WTFMove(value));
</del><ins>+ m_result = IDBAny::create(idbKeyDataToScriptValue(*context, *keyData));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBRequest::setResult(uint64_t number)
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx"> if (!context)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Deprecated::ScriptValue value = deserializeIDBValueData(*context, valueData);
</del><ins>+ auto value = deserializeIDBValueDataToJSValue(*context, valueData);
</ins><span class="cx"> m_result = IDBAny::create(WTFMove(value));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder locker(UniqueIDBDatabase::databaseThreadVM());
</span><span class="cx">
</span><del>- auto jsValue = idbValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), value);
</del><ins>+ auto jsValue = deserializeIDBValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), value);
</ins><span class="cx"> if (jsValue.isUndefinedOrNull())
</span><span class="cx"> return { };
</span><span class="cx">
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> JSLockHolder locker(UniqueIDBDatabase::databaseThreadVM());
</span><span class="cx">
</span><span class="cx"> for (auto iterator : *m_keyValueStore) {
</span><del>- auto jsValue = idbValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), iterator.value);
</del><ins>+ auto jsValue = deserializeIDBValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), iterator.value);
</ins><span class="cx"> if (jsValue.isUndefinedOrNull())
</span><span class="cx"> return { };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -37,9 +37,11 @@
</span><span class="cx"> #include "IndexKey.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "Logging.h"
</span><ins>+#include "ScriptState.h"
</ins><span class="cx"> #include "SharedBuffer.h"
</span><span class="cx"> #include "ThreadSafeDataBuffer.h"
</span><span class="cx">
</span><ins>+#include <bindings/ScriptValue.h>
</ins><span class="cx"> #include <runtime/DateInstance.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span><span class="cx">
</span><span class="lines">@@ -77,43 +79,6 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-JSValue idbKeyDataToJSValue(JSC::ExecState& exec, const IDBKeyData& keyData)
-{
- if (keyData.isNull())
- return jsUndefined();
-
- Locker<JSLock> locker(exec.vm().apiLock());
-
- switch (keyData.type()) {
- case KeyType::Array:
- {
- const Vector<IDBKeyData>& inArray = keyData.array();
- size_t size = inArray.size();
- JSArray* outArray = constructEmptyArray(&exec, 0, exec.lexicalGlobalObject(), size);
- for (size_t i = 0; i < size; ++i) {
- auto& arrayKey = inArray.at(i);
- outArray->putDirectIndex(&exec, i, idbKeyDataToJSValue(exec, arrayKey));
- }
- return JSValue(outArray);
- }
- case KeyType::String:
- return jsStringWithCache(&exec, keyData.string());
- case KeyType::Date:
- return jsDateOrNull(&exec, keyData.date());
- case KeyType::Number:
- return jsNumber(keyData.number());
- case KeyType::Min:
- case KeyType::Max:
- case KeyType::Invalid:
- ASSERT_NOT_REACHED();
- return jsUndefined();
- }
-
- ASSERT_NOT_REACHED();
- return jsUndefined();
-
-}
-
</del><span class="cx"> static JSValue idbKeyToJSValue(ExecState* exec, JSGlobalObject* globalObject, IDBKey* key)
</span><span class="cx"> {
</span><span class="cx"> if (!key || !exec) {
</span><span class="lines">@@ -201,13 +166,13 @@
</span><span class="cx"> return IDBKey::createInvalid();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IDBKeyPath idbKeyPathFromValue(ExecState* exec, JSValue keyPathValue)
</del><ins>+IDBKeyPath idbKeyPathFromValue(ExecState& exec, JSValue keyPathValue)
</ins><span class="cx"> {
</span><span class="cx"> IDBKeyPath keyPath;
</span><span class="cx"> if (isJSArray(keyPathValue))
</span><del>- keyPath = IDBKeyPath(toNativeArray<String>(exec, keyPathValue));
</del><ins>+ keyPath = IDBKeyPath(toNativeArray<String>(&exec, keyPathValue));
</ins><span class="cx"> else
</span><del>- keyPath = IDBKeyPath(keyPathValue.toString(exec)->value(exec));
</del><ins>+ keyPath = IDBKeyPath(keyPathValue.toString(&exec)->value(&exec));
</ins><span class="cx"> return keyPath;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -273,32 +238,6 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool injectIDBKeyIntoScriptValue(DOMRequestState* requestState, PassRefPtr<IDBKey> key, Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
-{
- LOG(StorageAPI, "injectIDBKeyIntoScriptValue");
-
- ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
-
- Vector<String> keyPathElements;
- IDBKeyPathParseError error;
- IDBParseKeyPath(keyPath.string(), keyPathElements, error);
- ASSERT(error == IDBKeyPathParseError::None);
-
- if (keyPathElements.isEmpty())
- return false;
-
- ExecState* exec = requestState->exec();
-
- JSValue parent = ensureNthValueOnKeyPath(exec, value.jsValue(), keyPathElements, keyPathElements.size() - 1);
- if (parent.isUndefined())
- return false;
-
- if (!set(exec, parent, keyPathElements.last(), idbKeyToJSValue(exec, exec->lexicalGlobalObject(), key.get())))
- return false;
-
- return true;
-}
-
</del><span class="cx"> bool injectIDBKeyIntoScriptValue(JSC::ExecState& exec, const IDBKeyData& keyData, JSC::JSValue value, const IDBKeyPath& keyPath)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "injectIDBKeyIntoScriptValue");
</span><span class="lines">@@ -327,47 +266,6 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(ExecState* exec, const Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
-{
- LOG(StorageAPI, "createIDBKeyFromScriptValueAndKeyPath");
- ASSERT(!keyPath.isNull());
-
- if (keyPath.type() == IndexedDB::KeyPathType::Array) {
- Vector<RefPtr<IDBKey>> result;
- const Vector<String>& array = keyPath.array();
- for (size_t i = 0; i < array.size(); i++) {
- RefPtr<IDBKey> key = internalCreateIDBKeyFromScriptValueAndKeyPath(exec, value, array[i]);
- if (!key)
- return nullptr;
- result.append(key);
- }
- return IDBKey::createArray(result);
- }
-
- ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
- return internalCreateIDBKeyFromScriptValueAndKeyPath(exec, value, keyPath.string());
-}
-
-RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState& exec, const Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
-{
- ASSERT(!keyPath.isNull());
-
- if (keyPath.type() == IndexedDB::KeyPathType::Array) {
- Vector<RefPtr<IDBKey>> result;
- const Vector<String>& array = keyPath.array();
- for (size_t i = 0; i < array.size(); i++) {
- RefPtr<IDBKey> key = internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, array[i]);
- if (!key)
- return nullptr;
- result.append(key);
- }
- return IDBKey::createArray(result);
- }
-
- ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
- return internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, keyPath.string());
-}
-
</del><span class="cx"> RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState& exec, const JSC::JSValue& value, const IDBKeyPath& keyPath)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!keyPath.isNull());
</span><span class="lines">@@ -389,17 +287,6 @@
</span><span class="cx"> return internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, keyPath.string());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool canInjectIDBKeyIntoScriptValue(DOMRequestState* requestState, const JSC::JSValue& scriptValue, const IDBKeyPath& keyPath)
-{
- LOG(StorageAPI, "canInjectIDBKeyIntoScriptValue");
-
- JSC::ExecState* exec = requestState->exec();
- if (!exec)
- return false;
-
- return canInjectIDBKeyIntoScriptValue(*exec, scriptValue, keyPath);
-}
-
</del><span class="cx"> bool canInjectIDBKeyIntoScriptValue(JSC::ExecState& execState, const JSC::JSValue& scriptValue, const IDBKeyPath& keyPath)
</span><span class="cx"> {
</span><span class="cx"> LOG(StorageAPI, "canInjectIDBKeyIntoScriptValue");
</span><span class="lines">@@ -416,30 +303,16 @@
</span><span class="cx"> return canInjectNthValueOnKeyPath(&execState, scriptValue, keyPathElements, keyPathElements.size() - 1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue deserializeIDBValue(DOMRequestState* requestState, PassRefPtr<SerializedScriptValue> prpValue)
</del><ins>+JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext& context, const ThreadSafeDataBuffer& valueData)
</ins><span class="cx"> {
</span><del>- ExecState* exec = requestState->exec();
- RefPtr<SerializedScriptValue> serializedValue = prpValue;
- JSValue result;
- if (serializedValue)
- result = serializedValue->deserialize(exec, exec->lexicalGlobalObject(), 0);
- else
- result = jsNull();
- return Deprecated::ScriptValue(exec->vm(), result);
-}
</del><ins>+ auto* state = context.execState();
+ if (!state)
+ return jsNull();
</ins><span class="cx">
</span><del>-Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext& context, const ThreadSafeDataBuffer& valueData)
-{
- DOMRequestState state(&context);
- auto* execState = state.exec();
-
- if (!execState)
- return Deprecated::ScriptValue();
-
- return Deprecated::ScriptValue(execState->vm(), deserializeIDBValueDataToJSValue(*execState, valueData));
</del><ins>+ return deserializeIDBValueDataToJSValue(*state, valueData);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
</del><ins>+JSValue deserializeIDBValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
</ins><span class="cx"> {
</span><span class="cx"> if (!valueData.data())
</span><span class="cx"> return jsUndefined();
</span><span class="lines">@@ -458,74 +331,24 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState* requestState, PassRefPtr<SharedBuffer> prpBuffer, bool keyIsDefined)
</del><ins>+RefPtr<IDBKey> scriptValueToIDBKey(ScriptExecutionContext& context, const JSC::JSValue& scriptValue)
</ins><span class="cx"> {
</span><del>- if (prpBuffer) {
- Vector<uint8_t> value;
- value.append(prpBuffer->data(), prpBuffer->size());
- return deserializeIDBValueBuffer(requestState->exec(), WTFMove(value), keyIsDefined);
- }
-
- return Deprecated::ScriptValue(requestState->exec()->vm(), jsNull());
</del><ins>+ return createIDBKeyFromValue(context.execState(), scriptValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static JSValue idbValueDataToJSValue(JSC::ExecState& exec, Vector<uint8_t>&& buffer)
</del><ins>+RefPtr<IDBKey> scriptValueToIDBKey(ExecState& state, const JSC::JSValue& scriptValue)
</ins><span class="cx"> {
</span><del>- if (buffer.isEmpty())
- return jsNull();
-
- RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::createFromWireBytes(WTFMove(buffer));
- return serializedValue->deserialize(&exec, exec.lexicalGlobalObject(), 0, NonThrowing);
</del><ins>+ return createIDBKeyFromValue(&state, scriptValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState* exec, Vector<uint8_t>&& buffer, bool keyIsDefined)
</del><ins>+JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext& context, const IDBKeyData& keyData)
</ins><span class="cx"> {
</span><del>- ASSERT(exec);
-
- // If the key doesn't exist, then the value must be undefined (as opposed to null).
- if (!keyIsDefined) {
- // We either shouldn't have a buffer or it should be of size 0.
- ASSERT(!buffer.size());
- return Deprecated::ScriptValue(exec->vm(), jsUndefined());
- }
-
- JSValue result = idbValueDataToJSValue(*exec, WTFMove(buffer));
- return Deprecated::ScriptValue(exec->vm(), result);
-}
-
-JSValue idbValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
-{
- if (!valueData.data())
</del><ins>+ auto* exec = context.execState();
+ if (!exec)
</ins><span class="cx"> return jsUndefined();
</span><span class="cx">
</span><del>- return idbValueDataToJSValue(exec, Vector<uint8_t>(*valueData.data()));
-}
-
-Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState* requestState, PassRefPtr<IDBKey> key)
-{
- ExecState* exec = requestState->exec();
- if (!exec)
- return { };
-
- return Deprecated::ScriptValue(exec->vm(), idbKeyToJSValue(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), key.get()));
-}
-
-RefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState* requestState, const JSC::JSValue& scriptValue)
-{
- ExecState* exec = requestState->exec();
- return createIDBKeyFromValue(exec, scriptValue);
-}
-
-RefPtr<IDBKey> scriptValueToIDBKey(ExecState& exec, const JSC::JSValue& scriptValue)
-{
- return createIDBKeyFromValue(&exec, scriptValue);
-}
-
-Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext* context, const IDBKeyData& keyData)
-{
</del><span class="cx"> RefPtr<IDBKey> key = keyData.maybeCreateIDBKey();
</span><del>- DOMRequestState requestState(context);
- return idbKeyToScriptValue(&requestState, key.get());
</del><ins>+ return Deprecated::ScriptValue(exec->vm(), idbKeyToJSValue(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), key.get())).jsValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Vector<IDBKeyData> createKeyPathArray(ExecState& exec, JSValue value, const IDBIndexInfo& info)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -29,49 +29,32 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="cx"> #include "Dictionary.h"
</span><del>-#include <bindings/ScriptValue.h>
</del><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class DOMRequestState;
</del><span class="cx"> class IDBIndexInfo;
</span><span class="cx"> class IDBKey;
</span><span class="cx"> class IDBKeyData;
</span><span class="cx"> class IDBKeyPath;
</span><span class="cx"> class IndexKey;
</span><del>-class SharedBuffer;
</del><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx">
</span><del>-IDBKeyPath idbKeyPathFromValue(JSC::ExecState*, JSC::JSValue);
</del><ins>+IDBKeyPath idbKeyPathFromValue(JSC::ExecState&, JSC::JSValue);
</ins><span class="cx">
</span><del>-bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey>, Deprecated::ScriptValue&, const IDBKeyPath&);
-bool injectIDBKeyIntoScriptValue(JSC::ExecState&, const IDBKeyData&, JSC::JSValue, const IDBKeyPath&);
-
-RefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(JSC::ExecState*, const Deprecated::ScriptValue&, const IDBKeyPath&);
-RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&, const Deprecated::ScriptValue&, const IDBKeyPath&);
</del><span class="cx"> RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&);
</span><del>-
-bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const JSC::JSValue&, const IDBKeyPath&);
</del><span class="cx"> bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&);
</span><ins>+bool injectIDBKeyIntoScriptValue(JSC::ExecState&, const IDBKeyData&, JSC::JSValue, const IDBKeyPath&);
</ins><span class="cx">
</span><del>-Deprecated::ScriptValue deserializeIDBValue(DOMRequestState*, PassRefPtr<SerializedScriptValue>);
-Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext&, const ThreadSafeDataBuffer& valueData);
-Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState*, PassRefPtr<SharedBuffer>, bool keyIsDefined);
-WEBCORE_EXPORT Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState*, Vector<uint8_t>&&, bool keyIsDefined);
</del><ins>+JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext&, const IDBKeyData&);
+void generateIndexKeyForValue(JSC::ExecState&, const IDBIndexInfo&, JSC::JSValue, IndexKey& outKey);
</ins><span class="cx">
</span><ins>+JSC::JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext&, const ThreadSafeDataBuffer& valueData);
</ins><span class="cx"> JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&, const ThreadSafeDataBuffer& valueData);
</span><span class="cx">
</span><del>-Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr<IDBKey>);
-RefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState*, const JSC::JSValue&);
</del><ins>+RefPtr<IDBKey> scriptValueToIDBKey(ScriptExecutionContext&, const JSC::JSValue&);
</ins><span class="cx"> RefPtr<IDBKey> scriptValueToIDBKey(JSC::ExecState&, const JSC::JSValue&);
</span><span class="cx">
</span><del>-Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext*, const IDBKeyData&);
-
-JSC::JSValue idbValueDataToJSValue(JSC::ExecState&, const ThreadSafeDataBuffer& valueData);
-void generateIndexKeyForValue(JSC::ExecState&, const IDBIndexInfo&, JSC::JSValue, IndexKey& outKey);
-JSC::JSValue idbKeyDataToJSValue(JSC::ExecState&, const IDBKeyData&);
-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBAnyCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> case IDBAny::Type::IDBTransaction:
</span><span class="cx"> return toJS(exec, globalObject, idbAny->idbTransaction());
</span><span class="cx"> case IDBAny::Type::ScriptValue:
</span><del>- return idbAny->scriptValue().jsValue();
</del><ins>+ return idbAny->scriptValue();
</ins><span class="cx"> case IDBAny::Type::String:
</span><span class="cx"> return jsStringWithCache(exec, idbAny->string());
</span><span class="cx"> case IDBAny::Type::Integer:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> return jsUndefined();
</span><span class="cx">
</span><span class="cx"> if (!keyPathValue.isUndefinedOrNull()) {
</span><del>- keyPath = idbKeyPathFromValue(&state, keyPathValue);
</del><ins>+ keyPath = idbKeyPathFromValue(state, keyPathValue);
</ins><span class="cx"> if (state.hadException())
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> IDBKeyPath keyPath;
</span><span class="cx"> JSValue keyPathValue = state.argument(1);
</span><span class="cx"> if (!keyPathValue.isUndefinedOrNull())
</span><del>- keyPath = idbKeyPathFromValue(&state, keyPathValue);
</del><ins>+ keyPath = idbKeyPathFromValue(state, keyPathValue);
</ins><span class="cx"> else {
</span><span class="cx"> ExceptionCodeWithMessage ec;
</span><span class="cx"> ec.code = IDBDatabaseException::SyntaxError;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -4358,9 +4358,12 @@
</span><span class="cx"> return "jsArray(state, $thisValue->globalObject(), $value)";
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ my $returnType = $signature->extendedAttributes->{"ImplementationReturnType"};
</ins><span class="cx"> if ($type eq "any") {
</span><span class="cx"> if ($interfaceName eq "Document") {
</span><span class="cx"> AddToImplIncludes("JSCanvasRenderingContext2D.h", $conditional);
</span><ins>+ } elsif (defined $returnType and $returnType eq "JSValue") {
+ return "$value";
</ins><span class="cx"> } else {
</span><span class="cx"> return "($value.hasNoValue() ? jsNull() : $value.jsValue())";
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -67,9 +67,10 @@
</span><span class="cx"> GetterRaisesExceptionWithMessage
</span><span class="cx"> GlobalContext=DOMWindow|WorkerGlobalScope|DedicatedWorkerGlobalScope
</span><span class="cx"> Immutable
</span><ins>+ImplementedAs=*
</ins><span class="cx"> ImplementationLacksVTable
</span><span class="cx"> ImplementationNamespace=*
</span><del>-ImplementedAs=*
</del><ins>+ImplementationReturnType=*
</ins><span class="cx"> ImplicitThis
</span><span class="cx"> InitializedByEventConstructor
</span><span class="cx"> InterfaceName=*
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptExecutionContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -487,4 +487,15 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+JSC::ExecState* ScriptExecutionContext::execState()
+{
+ if (is<Document>(*this)) {
+ Document& document = downcast<Document>(*this);
+ return execStateFromPage(mainThreadNormalWorld(), document.page());
+ }
+
+ WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(this);
+ return execStateFromWorkerGlobalScope(workerGlobalScope);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptExecutionContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptExecutionContext.h        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -188,6 +188,8 @@
</span><span class="cx"> int timerNestingLevel() const { return m_timerNestingLevel; }
</span><span class="cx"> void setTimerNestingLevel(int timerNestingLevel) { m_timerNestingLevel = timerNestingLevel; }
</span><span class="cx">
</span><ins>+ JSC::ExecState* execState();
+
</ins><span class="cx"> protected:
</span><span class="cx"> class AddConsoleMessageTask : public Task {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (199309 => 199310)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-11 20:10:36 UTC (rev 199309)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-11 21:31:53 UTC (rev 199310)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #include "EventTarget.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "IDBBindingUtilities.h"
</ins><span class="cx"> #include "IDBCursor.h"
</span><span class="cx"> #include "IDBCursorWithValue.h"
</span><span class="cx"> #include "IDBDatabase.h"
</span><span class="lines">@@ -333,7 +334,7 @@
</span><span class="cx"> return this == &other;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void handleEvent(ScriptExecutionContext*, Event* event) override
</del><ins>+ void handleEvent(ScriptExecutionContext* context, Event* event) override
</ins><span class="cx"> {
</span><span class="cx"> if (event->type() != eventNames().successEvent) {
</span><span class="cx"> m_requestCallback->sendFailure("Unexpected event type.");
</span><span class="lines">@@ -380,10 +381,14 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ JSC::ExecState* state = context ? context->execState() : nullptr;
+ if (!state)
+ return;
+
</ins><span class="cx"> RefPtr<DataEntry> dataEntry = DataEntry::create()
</span><del>- .setKey(m_injectedScript.wrapObject(idbCursor->key(), String(), true))
- .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String(), true))
- .setValue(m_injectedScript.wrapObject(idbCursor->value(), String(), true))
</del><ins>+ .setKey(m_injectedScript.wrapObject({ state->vm(), idbCursor->key(*state) }, String(), true))
+ .setPrimaryKey(m_injectedScript.wrapObject({ state->vm(), idbCursor->primaryKey(*state) }, String(), true))
+ .setValue(m_injectedScript.wrapObject({ state->vm(), idbCursor->value(*state) }, 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>