<!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  &lt;beidson@apple.com&gt;
+
+        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  &lt;barraclough@apple.com&gt;
</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&amp; value)
</del><ins>+IDBAny::IDBAny(const JSC::JSValue&amp; 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&amp; 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 &quot;IDBKeyPath.h&quot;
</span><span class="cx"> #include &quot;ScriptWrappable.h&quot;
</span><del>-#include &lt;bindings/ScriptValue.h&gt;
</del><ins>+#include &lt;runtime/JSCJSValue.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</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&lt;IDBAny&gt; create(const Deprecated::ScriptValue&amp; value)
</del><ins>+    static RefPtr&lt;IDBAny&gt; create(const JSC::JSValue&amp; 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&lt;IDBIndex&gt; idbIndex();
</span><span class="cx">     RefPtr&lt;IDBObjectStore&gt; idbObjectStore();
</span><span class="cx">     RefPtr&lt;IDBTransaction&gt; idbTransaction();
</span><del>-    const Deprecated::ScriptValue&amp; scriptValue();
</del><ins>+    JSC::JSValue scriptValue();
</ins><span class="cx">     int64_t integer();
</span><span class="cx">     const String&amp; string();
</span><span class="cx">     const IDBKeyPath&amp; keyPath();
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     explicit IDBAny(Ref&lt;IDBIndex&gt;&amp;&amp;);
</span><span class="cx">     explicit IDBAny(Ref&lt;IDBCursor&gt;&amp;&amp;);
</span><span class="cx">     explicit IDBAny(const IDBKeyPath&amp;);
</span><del>-    explicit IDBAny(const Deprecated::ScriptValue&amp;);
</del><ins>+    explicit IDBAny(const JSC::JSValue&amp;);
</ins><span class="cx"> 
</span><span class="cx">     IDBAny::Type m_type { IDBAny::Type::Undefined };
</span><span class="cx">     RefPtr&lt;IDBDatabase&gt; m_database;
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">     RefPtr&lt;IDBCursorWithValue&gt; 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 &quot;ScriptExecutionContext.h&quot;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</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&amp; 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&amp; IDBCursor::key() const
</del><ins>+JSValue IDBCursor::key(ExecState&amp;) 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&amp; IDBCursor::primaryKey() const
</del><ins>+JSValue IDBCursor::primaryKey(ExecState&amp;) 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&amp; IDBCursor::value() const
</del><ins>+JSValue IDBCursor::value(ExecState&amp;) 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&amp; context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
</del><span class="cx">     RefPtr&lt;IDBKey&gt; key;
</span><span class="cx">     if (!keyValue.jsValue().isUndefined())
</span><del>-        key = scriptValueToIDBKey(&amp;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 &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;IDBAny.h&quot;
</span><span class="cx"> #include &quot;IDBCursorInfo.h&quot;
</span><ins>+#include &lt;runtime/JSCJSValue.h&gt;
</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&amp; direction() const;
</span><del>-    const Deprecated::ScriptValue&amp; key() const;
-    const Deprecated::ScriptValue&amp; primaryKey() const;
-    const Deprecated::ScriptValue&amp; value() const;
</del><ins>+    JSC::JSValue key(JSC::ExecState&amp;) const;
+    JSC::JSValue primaryKey(JSC::ExecState&amp;) const;
+    JSC::JSValue value(JSC::ExecState&amp;) const;
</ins><span class="cx">     IDBAny* source();
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebCore::IDBRequest&gt; update(JSC::ExecState&amp;, Deprecated::ScriptValue&amp;, ExceptionCodeWithMessage&amp;);
</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&amp; context, const Deprecated::ScriptValue&amp; firstValue, const Deprecated::ScriptValue&amp; secondValue, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; first = scriptValueToIDBKey(&amp;requestState, firstValue);
-    RefPtr&lt;IDBKey&gt; second = scriptValueToIDBKey(&amp;requestState, secondValue);
</del><ins>+    RefPtr&lt;IDBKey&gt; first = scriptValueToIDBKey(context, firstValue);
+    RefPtr&lt;IDBKey&gt; 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, &quot;IDBIndex::count&quot;);
</span><span class="cx"> 
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.&quot;);
</span><span class="lines">@@ -242,8 +241,7 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::get&quot;);
</span><span class="cx"> 
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.&quot;);
</span><span class="lines">@@ -287,8 +285,7 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
</span><span class="cx"> 
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.&quot;);
</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 &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="cx"> #include &quot;IDBKey.h&quot;
</span><ins>+#include &quot;IDBKeyData.h&quot;
</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&lt;IDBKeyRange&gt; IDBKeyRange::create(RefPtr&lt;IDBKey&gt;&amp;&amp; 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&amp; context) const
</del><ins>+JSValue IDBKeyRange::lowerValue(ScriptExecutionContext&amp; context) const
</ins><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    return idbKeyToScriptValue(&amp;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&amp; context) const
</del><ins>+JSValue IDBKeyRange::upperValue(ScriptExecutionContext&amp; context) const
</ins><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    return idbKeyToScriptValue(&amp;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&lt;IDBKeyRange&gt; IDBKeyRange::only(RefPtr&lt;IDBKey&gt;&amp;&amp; key, ExceptionCode&amp; ec)
</span><span class="lines">@@ -73,8 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; keyValue, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(&amp;requestState, keyValue);
</del><ins>+    RefPtr&lt;IDBKey&gt; key = scriptValueToIDBKey(context, keyValue);
</ins><span class="cx">     if (!key || !key-&gt;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&lt;IDBKeyRange&gt; IDBKeyRange::lowerBound(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(&amp;requestState, boundValue);
</del><ins>+    RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(context, boundValue);
</ins><span class="cx">     if (!bound || !bound-&gt;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&lt;IDBKeyRange&gt; IDBKeyRange::upperBound(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; boundValue, bool open, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(&amp;requestState, boundValue);
</del><ins>+    RefPtr&lt;IDBKey&gt; bound = scriptValueToIDBKey(context, boundValue);
</ins><span class="cx">     if (!bound || !bound-&gt;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&lt;IDBKeyRange&gt; IDBKeyRange::bound(ScriptExecutionContext&amp; context, const Deprecated::ScriptValue&amp; lowerValue, const Deprecated::ScriptValue&amp; upperValue, bool lowerOpen, bool upperOpen, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; lower = scriptValueToIDBKey(&amp;requestState, lowerValue);
-    RefPtr&lt;IDBKey&gt; upper = scriptValueToIDBKey(&amp;requestState, upperValue);
</del><ins>+    RefPtr&lt;IDBKey&gt; lower = scriptValueToIDBKey(context, lowerValue);
+    RefPtr&lt;IDBKey&gt; upper = scriptValueToIDBKey(context, upperValue);
</ins><span class="cx"> 
</span><span class="cx">     if (!lower || !lower-&gt;isValid() || !upper || !upper-&gt;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&amp;) const;
-    Deprecated::ScriptValue upperValue(ScriptExecutionContext&amp;) const;
</del><ins>+    JSC::JSValue  lowerValue(ScriptExecutionContext&amp;) const;
+    JSC::JSValue upperValue(ScriptExecutionContext&amp;) 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(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
</span><span class="lines">@@ -399,8 +398,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBObjectStore::modernDelete(ScriptExecutionContext&amp; context, JSC::JSValue key, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
</span><span class="lines">@@ -594,8 +592,7 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
</span><span class="cx"> 
</span><del>-    DOMRequestState requestState(&amp;context);
-    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(&amp;requestState, key);
</del><ins>+    RefPtr&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(context, key);
</ins><span class="cx">     if (!idbKey || idbKey-&gt;type() == KeyType::Invalid) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
</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 &quot;IndexKey.h&quot;
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;ScriptState.h&quot;
</ins><span class="cx"> #include &quot;SharedBuffer.h&quot;
</span><span class="cx"> #include &quot;ThreadSafeDataBuffer.h&quot;
</span><span class="cx"> 
</span><ins>+#include &lt;bindings/ScriptValue.h&gt;
</ins><span class="cx"> #include &lt;runtime/DateInstance.h&gt;
</span><span class="cx"> #include &lt;runtime/ObjectConstructor.h&gt;
</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&amp; exec, const IDBKeyData&amp; keyData)
-{
-    if (keyData.isNull())
-        return jsUndefined();
-
-    Locker&lt;JSLock&gt; locker(exec.vm().apiLock());
-
-    switch (keyData.type()) {
-    case KeyType::Array:
-        {
-            const Vector&lt;IDBKeyData&gt;&amp; inArray = keyData.array();
-            size_t size = inArray.size();
-            JSArray* outArray = constructEmptyArray(&amp;exec, 0, exec.lexicalGlobalObject(), size);
-            for (size_t i = 0; i &lt; size; ++i) {
-                auto&amp; arrayKey = inArray.at(i);
-                outArray-&gt;putDirectIndex(&amp;exec, i, idbKeyDataToJSValue(exec, arrayKey));
-            }
-            return JSValue(outArray);
-        }
-    case KeyType::String:
-        return jsStringWithCache(&amp;exec, keyData.string());
-    case KeyType::Date:
-        return jsDateOrNull(&amp;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&amp; 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&lt;String&gt;(exec, keyPathValue));
</del><ins>+        keyPath = IDBKeyPath(toNativeArray&lt;String&gt;(&amp;exec, keyPathValue));
</ins><span class="cx">     else
</span><del>-        keyPath = IDBKeyPath(keyPathValue.toString(exec)-&gt;value(exec));
</del><ins>+        keyPath = IDBKeyPath(keyPathValue.toString(&amp;exec)-&gt;value(&amp;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&lt;IDBKey&gt; key, Deprecated::ScriptValue&amp; value, const IDBKeyPath&amp; keyPath)
-{
-    LOG(StorageAPI, &quot;injectIDBKeyIntoScriptValue&quot;);
-
-    ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
-
-    Vector&lt;String&gt; keyPathElements;
-    IDBKeyPathParseError error;
-    IDBParseKeyPath(keyPath.string(), keyPathElements, error);
-    ASSERT(error == IDBKeyPathParseError::None);
-
-    if (keyPathElements.isEmpty())
-        return false;
-
-    ExecState* exec = requestState-&gt;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-&gt;lexicalGlobalObject(), key.get())))
-        return false;
-
-    return true;
-}
-
</del><span class="cx"> bool injectIDBKeyIntoScriptValue(JSC::ExecState&amp; exec, const IDBKeyData&amp; keyData, JSC::JSValue value, const IDBKeyPath&amp; keyPath)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;injectIDBKeyIntoScriptValue&quot;);
</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&lt;IDBKey&gt; createIDBKeyFromScriptValueAndKeyPath(ExecState* exec, const Deprecated::ScriptValue&amp; value, const IDBKeyPath&amp; keyPath)
-{
-    LOG(StorageAPI, &quot;createIDBKeyFromScriptValueAndKeyPath&quot;);
-    ASSERT(!keyPath.isNull());
-
-    if (keyPath.type() == IndexedDB::KeyPathType::Array) {
-        Vector&lt;RefPtr&lt;IDBKey&gt;&gt; result;
-        const Vector&lt;String&gt;&amp; array = keyPath.array();
-        for (size_t i = 0; i &lt; array.size(); i++) {
-            RefPtr&lt;IDBKey&gt; 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&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState&amp; exec, const Deprecated::ScriptValue&amp; value, const IDBKeyPath&amp; keyPath)
-{
-    ASSERT(!keyPath.isNull());
-
-    if (keyPath.type() == IndexedDB::KeyPathType::Array) {
-        Vector&lt;RefPtr&lt;IDBKey&gt;&gt; result;
-        const Vector&lt;String&gt;&amp; array = keyPath.array();
-        for (size_t i = 0; i &lt; array.size(); i++) {
-            RefPtr&lt;IDBKey&gt; key = internalCreateIDBKeyFromScriptValueAndKeyPath(&amp;exec, value, array[i]);
-            if (!key)
-                return nullptr;
-            result.append(key);
-        }
-        return IDBKey::createArray(result);
-    }
-
-    ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
-    return internalCreateIDBKeyFromScriptValueAndKeyPath(&amp;exec, value, keyPath.string());
-}
-
</del><span class="cx"> RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState&amp; exec, const JSC::JSValue&amp; value, const IDBKeyPath&amp; 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(&amp;exec, value, keyPath.string());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool canInjectIDBKeyIntoScriptValue(DOMRequestState* requestState, const JSC::JSValue&amp; scriptValue, const IDBKeyPath&amp; keyPath)
-{
-    LOG(StorageAPI, &quot;canInjectIDBKeyIntoScriptValue&quot;);
-
-    JSC::ExecState* exec = requestState-&gt;exec();
-    if (!exec)
-        return false;
-
-    return canInjectIDBKeyIntoScriptValue(*exec, scriptValue, keyPath);
-}
-
</del><span class="cx"> bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&amp; execState, const JSC::JSValue&amp; scriptValue, const IDBKeyPath&amp; keyPath)
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;canInjectIDBKeyIntoScriptValue&quot;);
</span><span class="lines">@@ -416,30 +303,16 @@
</span><span class="cx">     return canInjectNthValueOnKeyPath(&amp;execState, scriptValue, keyPathElements, keyPathElements.size() - 1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValue(DOMRequestState* requestState, PassRefPtr&lt;SerializedScriptValue&gt; prpValue)
</del><ins>+JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext&amp; context, const ThreadSafeDataBuffer&amp; valueData)
</ins><span class="cx"> {
</span><del>-    ExecState* exec = requestState-&gt;exec();
-    RefPtr&lt;SerializedScriptValue&gt; serializedValue = prpValue;
-    JSValue result;
-    if (serializedValue)
-        result = serializedValue-&gt;deserialize(exec, exec-&gt;lexicalGlobalObject(), 0);
-    else
-        result = jsNull();
-    return Deprecated::ScriptValue(exec-&gt;vm(), result);
-}
</del><ins>+    auto* state = context.execState();
+    if (!state)
+        return jsNull();
</ins><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext&amp; context, const ThreadSafeDataBuffer&amp; valueData)
-{
-    DOMRequestState state(&amp;context);
-    auto* execState = state.exec();
-
-    if (!execState)
-        return Deprecated::ScriptValue();
-
-    return Deprecated::ScriptValue(execState-&gt;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&amp; exec, const ThreadSafeDataBuffer&amp; valueData)
</del><ins>+JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&amp; exec, const ThreadSafeDataBuffer&amp; 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&lt;SharedBuffer&gt; prpBuffer, bool keyIsDefined)
</del><ins>+RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(ScriptExecutionContext&amp; context, const JSC::JSValue&amp; scriptValue)
</ins><span class="cx"> {
</span><del>-    if (prpBuffer) {
-        Vector&lt;uint8_t&gt; value;
-        value.append(prpBuffer-&gt;data(), prpBuffer-&gt;size());
-        return deserializeIDBValueBuffer(requestState-&gt;exec(), WTFMove(value), keyIsDefined);
-    }
-
-    return Deprecated::ScriptValue(requestState-&gt;exec()-&gt;vm(), jsNull());
</del><ins>+    return createIDBKeyFromValue(context.execState(), scriptValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static JSValue idbValueDataToJSValue(JSC::ExecState&amp; exec, Vector&lt;uint8_t&gt;&amp;&amp; buffer)
</del><ins>+RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(ExecState&amp; state, const JSC::JSValue&amp; scriptValue)
</ins><span class="cx"> {
</span><del>-    if (buffer.isEmpty())
-        return jsNull();
-
-    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::createFromWireBytes(WTFMove(buffer));
-    return serializedValue-&gt;deserialize(&amp;exec, exec.lexicalGlobalObject(), 0, NonThrowing);
</del><ins>+    return createIDBKeyFromValue(&amp;state, scriptValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState* exec, Vector&lt;uint8_t&gt;&amp;&amp; buffer, bool keyIsDefined)
</del><ins>+JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext&amp; context, const IDBKeyData&amp; 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-&gt;vm(), jsUndefined());
-    }
-
-    JSValue result = idbValueDataToJSValue(*exec, WTFMove(buffer));
-    return Deprecated::ScriptValue(exec-&gt;vm(), result);
-}
-
-JSValue idbValueDataToJSValue(JSC::ExecState&amp; exec, const ThreadSafeDataBuffer&amp; 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&lt;uint8_t&gt;(*valueData.data()));
-}
-
-Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState* requestState, PassRefPtr&lt;IDBKey&gt; key)
-{
-    ExecState* exec = requestState-&gt;exec();
-    if (!exec)
-        return { };
-
-    return Deprecated::ScriptValue(exec-&gt;vm(), idbKeyToJSValue(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), key.get()));
-}
-
-RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(DOMRequestState* requestState, const JSC::JSValue&amp; scriptValue)
-{
-    ExecState* exec = requestState-&gt;exec();
-    return createIDBKeyFromValue(exec, scriptValue);
-}
-
-RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(ExecState&amp; exec, const JSC::JSValue&amp; scriptValue)
-{
-    return createIDBKeyFromValue(&amp;exec, scriptValue);
-}
-
-Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext* context, const IDBKeyData&amp; keyData)
-{
</del><span class="cx">     RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
</span><del>-    DOMRequestState requestState(context);
-    return idbKeyToScriptValue(&amp;requestState, key.get());
</del><ins>+    return Deprecated::ScriptValue(exec-&gt;vm(), idbKeyToJSValue(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), key.get())).jsValue();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Vector&lt;IDBKeyData&gt; createKeyPathArray(ExecState&amp; exec, JSValue value, const IDBIndexInfo&amp; 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 &quot;Dictionary.h&quot;
</span><del>-#include &lt;bindings/ScriptValue.h&gt;
</del><span class="cx"> #include &lt;wtf/Forward.h&gt;
</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&amp;, JSC::JSValue);
</ins><span class="cx"> 
</span><del>-bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr&lt;IDBKey&gt;, Deprecated::ScriptValue&amp;, const IDBKeyPath&amp;);
-bool injectIDBKeyIntoScriptValue(JSC::ExecState&amp;, const IDBKeyData&amp;, JSC::JSValue, const IDBKeyPath&amp;);
-
-RefPtr&lt;IDBKey&gt; createIDBKeyFromScriptValueAndKeyPath(JSC::ExecState*, const Deprecated::ScriptValue&amp;, const IDBKeyPath&amp;);
-RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&amp;, const Deprecated::ScriptValue&amp;, const IDBKeyPath&amp;);
</del><span class="cx"> RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&amp;, const JSC::JSValue&amp;, const IDBKeyPath&amp;);
</span><del>-
-bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const JSC::JSValue&amp;, const IDBKeyPath&amp;);
</del><span class="cx"> bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&amp;, const JSC::JSValue&amp;, const IDBKeyPath&amp;);
</span><ins>+bool injectIDBKeyIntoScriptValue(JSC::ExecState&amp;, const IDBKeyData&amp;, JSC::JSValue, const IDBKeyPath&amp;);
</ins><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValue(DOMRequestState*, PassRefPtr&lt;SerializedScriptValue&gt;);
-Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext&amp;, const ThreadSafeDataBuffer&amp; valueData);
-Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState*, PassRefPtr&lt;SharedBuffer&gt;, bool keyIsDefined);
-WEBCORE_EXPORT Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState*, Vector&lt;uint8_t&gt;&amp;&amp;, bool keyIsDefined);
</del><ins>+JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext&amp;, const IDBKeyData&amp;);
+void generateIndexKeyForValue(JSC::ExecState&amp;, const IDBIndexInfo&amp;, JSC::JSValue, IndexKey&amp; outKey);
</ins><span class="cx"> 
</span><ins>+JSC::JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext&amp;, const ThreadSafeDataBuffer&amp; valueData);
</ins><span class="cx"> JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&amp;, const ThreadSafeDataBuffer&amp; valueData);
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr&lt;IDBKey&gt;);
-RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(DOMRequestState*, const JSC::JSValue&amp;);
</del><ins>+RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(ScriptExecutionContext&amp;, const JSC::JSValue&amp;);
</ins><span class="cx"> RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(JSC::ExecState&amp;, const JSC::JSValue&amp;);
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext*, const IDBKeyData&amp;);
-
-JSC::JSValue idbValueDataToJSValue(JSC::ExecState&amp;, const ThreadSafeDataBuffer&amp; valueData);
-void generateIndexKeyForValue(JSC::ExecState&amp;, const IDBIndexInfo&amp;, JSC::JSValue, IndexKey&amp; outKey);
-JSC::JSValue idbKeyDataToJSValue(JSC::ExecState&amp;, const IDBKeyData&amp;);
-
</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-&gt;idbTransaction());
</span><span class="cx">     case IDBAny::Type::ScriptValue:
</span><del>-        return idbAny-&gt;scriptValue().jsValue();
</del><ins>+        return idbAny-&gt;scriptValue();
</ins><span class="cx">     case IDBAny::Type::String:
</span><span class="cx">         return jsStringWithCache(exec, idbAny-&gt;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(&amp;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(&amp;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 &quot;jsArray(state, $thisValue-&gt;globalObject(), $value)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    my $returnType = $signature-&gt;extendedAttributes-&gt;{&quot;ImplementationReturnType&quot;};
</ins><span class="cx">     if ($type eq &quot;any&quot;) {
</span><span class="cx">         if ($interfaceName eq &quot;Document&quot;) {
</span><span class="cx">             AddToImplIncludes(&quot;JSCanvasRenderingContext2D.h&quot;, $conditional);
</span><ins>+        } elsif (defined $returnType and $returnType eq &quot;JSValue&quot;) {
+            return &quot;$value&quot;;
</ins><span class="cx">         } else {
</span><span class="cx">             return &quot;($value.hasNoValue() ? jsNull() : $value.jsValue())&quot;;
</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&lt;Document&gt;(*this)) {
+        Document&amp; document = downcast&lt;Document&gt;(*this);
+        return execStateFromPage(mainThreadNormalWorld(), document.page());
+    }
+
+    WorkerGlobalScope* workerGlobalScope = static_cast&lt;WorkerGlobalScope*&gt;(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 &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><ins>+#include &quot;IDBBindingUtilities.h&quot;
</ins><span class="cx"> #include &quot;IDBCursor.h&quot;
</span><span class="cx"> #include &quot;IDBCursorWithValue.h&quot;
</span><span class="cx"> #include &quot;IDBDatabase.h&quot;
</span><span class="lines">@@ -333,7 +334,7 @@
</span><span class="cx">         return this == &amp;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-&gt;type() != eventNames().successEvent) {
</span><span class="cx">             m_requestCallback-&gt;sendFailure(&quot;Unexpected event type.&quot;);
</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-&gt;execState() : nullptr;
+        if (!state)
+            return;
+
</ins><span class="cx">         RefPtr&lt;DataEntry&gt; dataEntry = DataEntry::create()
</span><del>-            .setKey(m_injectedScript.wrapObject(idbCursor-&gt;key(), String(), true))
-            .setPrimaryKey(m_injectedScript.wrapObject(idbCursor-&gt;primaryKey(), String(), true))
-            .setValue(m_injectedScript.wrapObject(idbCursor-&gt;value(), String(), true))
</del><ins>+            .setKey(m_injectedScript.wrapObject({ state-&gt;vm(), idbCursor-&gt;key(*state) }, String(), true))
+            .setPrimaryKey(m_injectedScript.wrapObject({ state-&gt;vm(), idbCursor-&gt;primaryKey(*state) }, String(), true))
+            .setValue(m_injectedScript.wrapObject({ state-&gt;vm(), idbCursor-&gt;value(*state) }, String(), true))
</ins><span class="cx">             .release();
</span><span class="cx">         m_result-&gt;addItem(WTFMove(dataEntry));
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>