<!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>[199643] 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/199643">199643</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-17 11:49:53 -0700 (Sun, 17 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 (as JSC::Strong&lt;JSC::Unknown&gt;) 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):

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue):
(WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
(WebCore::injectIDBKeyIntoScriptValue):
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
(WebCore::canInjectIDBKeyIntoScriptValue):
(WebCore::deserializeIDBValueToJSValue):
(WebCore::deserializeIDBValueDataToJSValue):
(WebCore::scriptValueToIDBKey):
(WebCore::idbKeyDataToScriptValue):
(WebCore::idbKeyDataToJSValue): Deleted.
(WebCore::createIDBKeyFromScriptValueAndKeyPath): 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="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/ChangeLog        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -1,3 +1,111 @@
</span><ins>+2016-04-17  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 (as JSC::Strong&lt;JSC::Unknown&gt;) 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):
+        
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
+        
+        * bindings/js/IDBBindingUtilities.cpp:
+        (WebCore::idbKeyPathFromValue):
+        (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
+        (WebCore::injectIDBKeyIntoScriptValue):
+        (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
+        (WebCore::canInjectIDBKeyIntoScriptValue):
+        (WebCore::deserializeIDBValueToJSValue):
+        (WebCore::deserializeIDBValueDataToJSValue):
+        (WebCore::scriptValueToIDBKey):
+        (WebCore::idbKeyDataToScriptValue):
+        (WebCore::idbKeyDataToJSValue): Deleted.
+        (WebCore::createIDBKeyFromScriptValueAndKeyPath): 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-17  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove more uses of Deprecated::ScriptXXX
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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::Strong&lt;JSC::Unknown&gt;&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,9 +133,9 @@
</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><del>-    return m_scriptValue;
</del><ins>+    return m_scriptValue.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int64_t IDBAny::integer()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBAnyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -29,7 +29,8 @@
</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;heap/Strong.h&gt;
+#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 +71,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::Strong&lt;JSC::Unknown&gt;&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 +109,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 +121,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::Strong&lt;JSC::Unknown&gt;&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 +131,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>+    JSC::Strong&lt;JSC::Unknown&gt; 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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBDatabaseException.h&quot;
</span><span class="lines">@@ -40,6 +39,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 +158,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.get();
</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.get();
</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.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBAny* IDBCursor::source()
</span><span class="lines">@@ -224,7 +225,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.get(), ec);
</ins><span class="cx">     if (ec.code)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -280,10 +281,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 +380,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.get(), ec);
</ins><span class="cx">     if (ec.code)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -400,25 +400,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 = deserializeIDBValue(*context, getResult.value());
</del><ins>+        m_currentValue = deserializeIDBValueToJSValue(*context, getResult.value());
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-17 18:49:53 UTC (rev 199643)
</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::Strong&lt;JSC::Unknown&gt; m_currentKey;
+    JSC::Strong&lt;JSC::Unknown&gt; m_currentPrimaryKey;
+    JSC::Strong&lt;JSC::Unknown&gt; 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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="lines">@@ -149,9 +148,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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;IDBAny.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBCursor.h&quot;
</span><span class="lines">@@ -160,8 +159,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 +240,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 +284,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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -26,13 +26,15 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;IDBKeyRange.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><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 +51,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())).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())).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 +73,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 +84,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 +95,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 +106,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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;DOMStringList.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBCursor.h&quot;
</span><span class="lines">@@ -182,8 +181,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 +397,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 +591,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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMError.h&quot;
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;Event.h&quot;
</span><span class="cx"> #include &quot;EventQueue.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="lines">@@ -326,19 +325,19 @@
</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="cx"> {
</span><span class="cx">     ASSERT(scriptExecutionContext());
</span><del>-    m_result = IDBAny::create(Deprecated::ScriptValue(scriptExecutionContext()-&gt;vm(), JSC::JSValue(number)));
</del><ins>+    m_result = IDBAny::create(JSC::Strong&lt;JSC::Unknown&gt;(scriptExecutionContext()-&gt;vm(), JSC::JSValue(number)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBRequest::setResultToStructuredClone(const IDBValue&amp; value)
</span><span class="lines">@@ -349,8 +348,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Deprecated::ScriptValue scriptValue = deserializeIDBValue(*context, value);
-    m_result = IDBAny::create(WTFMove(scriptValue));
</del><ins>+    m_result = IDBAny::create(deserializeIDBValueToJSValue(*context, value));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBRequest::setResultToUndefined()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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">@@ -310,7 +310,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; index : m_indexesByName.values()) {
</span><span class="cx">         IndexKey indexKey;
</span><del>-        generateIndexKeyForValue(UniqueIDBDatabase::databaseThreadExecState(), index-&gt;info(), jsValue, indexKey);
</del><ins>+        generateIndexKeyForValue(UniqueIDBDatabase::databaseThreadExecState(), index-&gt;info(), jsValue.get(), indexKey);
</ins><span class="cx"> 
</span><span class="cx">         if (indexKey.isNull())
</span><span class="cx">             continue;
</span><span class="lines">@@ -339,12 +339,12 @@
</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 class="cx">         IndexKey indexKey;
</span><del>-        generateIndexKeyForValue(UniqueIDBDatabase::databaseThreadExecState(), index.info(), jsValue, indexKey);
</del><ins>+        generateIndexKeyForValue(UniqueIDBDatabase::databaseThreadExecState(), index.info(), jsValue.get(), indexKey);
</ins><span class="cx"> 
</span><span class="cx">         if (indexKey.isNull())
</span><span class="cx">             continue;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -1468,7 +1468,7 @@
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><span class="cx">     IndexKey indexKey;
</span><del>-    generateIndexKeyForValue(*m_globalObject-&gt;globalExec(), info, jsValue, indexKey);
</del><ins>+    generateIndexKeyForValue(*m_globalObject-&gt;globalExec(), info, jsValue.get(), indexKey);
</ins><span class="cx"> 
</span><span class="cx">     if (indexKey.isNull())
</span><span class="cx">         return { };
</span><span class="lines">@@ -1488,7 +1488,7 @@
</span><span class="cx">     bool anyRecordsSucceeded = false;
</span><span class="cx">     for (auto&amp; index : info.indexMap().values()) {
</span><span class="cx">         IndexKey indexKey;
</span><del>-        generateIndexKeyForValue(*m_globalObject-&gt;globalExec(), index, jsValue, indexKey);
</del><ins>+        generateIndexKeyForValue(*m_globalObject-&gt;globalExec(), index, jsValue.get(), indexKey);
</ins><span class="cx"> 
</span><span class="cx">         if (indexKey.isNull())
</span><span class="cx">             continue;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -765,18 +765,18 @@
</span><span class="cx">     if (usedKeyIsGenerated &amp;&amp; !objectStoreInfo-&gt;keyPath().isNull()) {
</span><span class="cx">         JSLockHolder locker(databaseThreadVM());
</span><span class="cx"> 
</span><del>-        JSValue value = deserializeIDBValueDataToJSValue(databaseThreadExecState(), originalRecordValue.data());
-        if (value.isUndefined()) {
</del><ins>+        auto value = deserializeIDBValueDataToJSValue(databaseThreadExecState(), originalRecordValue.data());
+        if (value.get().isUndefined()) {
</ins><span class="cx">             m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to deserialize record value for record key injection&quot;)), usedKey));
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (!injectIDBKeyIntoScriptValue(databaseThreadExecState(), usedKey, value, objectStoreInfo-&gt;keyPath())) {
</del><ins>+        if (!injectIDBKeyIntoScriptValue(databaseThreadExecState(), usedKey, value.get(), objectStoreInfo-&gt;keyPath())) {
</ins><span class="cx">             m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to inject record key into record value&quot;)), usedKey));
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        auto serializedValue = SerializedScriptValue::create(&amp;databaseThreadExecState(), value, nullptr, nullptr);
</del><ins>+        auto serializedValue = SerializedScriptValue::create(&amp;databaseThreadExecState(), value.get(), nullptr, nullptr);
</ins><span class="cx">         if (databaseThreadExecState().hadException()) {
</span><span class="cx">             m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(IDBDatabaseException::ConstraintError, ASCIILiteral(&quot;Unable to serialize record value after injecting record key&quot;)), usedKey));
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><span class="cx">  * Copyright (C) 2012 Michael Pruett &lt;michael@68k.org&gt;
</span><ins>+ * Copyright (C) 2014, 2015, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,7 +30,6 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;DOMRequestState.h&quot;
</del><span class="cx"> #include &quot;IDBIndexInfo.h&quot;
</span><span class="cx"> #include &quot;IDBKey.h&quot;
</span><span class="cx"> #include &quot;IDBKeyData.h&quot;
</span><span class="lines">@@ -38,6 +38,7 @@
</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;ScriptExecutionContext.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><span class="lines">@@ -78,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">@@ -202,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">@@ -224,7 +188,7 @@
</span><span class="cx">     return currentValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;IDBKey&gt; internalCreateIDBKeyFromScriptValueAndKeyPath(ExecState* exec, const JSC::JSValue&amp; value, const String&amp; keyPath)
</del><ins>+static RefPtr&lt;IDBKey&gt; internalCreateIDBKeyFromScriptValueAndKeyPath(ExecState* exec, const JSValue&amp; value, const String&amp; keyPath)
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;String&gt; keyPathElements;
</span><span class="cx">     IDBKeyPathParseError error;
</span><span class="lines">@@ -274,34 +238,8 @@
</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)
</del><ins>+bool injectIDBKeyIntoScriptValue(ExecState&amp; exec, const IDBKeyData&amp; keyData, JSValue value, const IDBKeyPath&amp; keyPath)
</ins><span class="cx"> {
</span><del>-    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;
-}
-
-bool injectIDBKeyIntoScriptValue(JSC::ExecState&amp; exec, const IDBKeyData&amp; keyData, JSC::JSValue value, const IDBKeyPath&amp; keyPath)
-{
</del><span class="cx">     LOG(IndexedDB, &quot;injectIDBKeyIntoScriptValue&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
</span><span class="lines">@@ -328,53 +266,13 @@
</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());
</del><span class="cx"> 
</span><del>-    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)
</del><ins>+RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState&amp; exec, const JSValue&amp; value, const IDBKeyPath&amp; keyPath)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!keyPath.isNull());
</span><span class="cx"> 
</span><span class="cx">     if (keyPath.type() == IndexedDB::KeyPathType::Array) {
</span><del>-        Vector&lt;RefPtr&lt;IDBKey&gt;&gt; result;
</del><span class="cx">         const Vector&lt;String&gt;&amp; array = keyPath.array();
</span><del>-        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());
-}
-
-RefPtr&lt;IDBKey&gt; maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState&amp; exec, const JSC::JSValue&amp; value, const IDBKeyPath&amp; keyPath)
-{
-    ASSERT(!keyPath.isNull());
-
-    if (keyPath.type() == IndexedDB::KeyPathType::Array) {
-        const Vector&lt;String&gt;&amp; array = keyPath.array();
</del><span class="cx">         Vector&lt;RefPtr&lt;IDBKey&gt;&gt; result;
</span><span class="cx">         result.reserveInitialCapacity(array.size());
</span><span class="cx">         for (auto&amp; string : array) {
</span><span class="lines">@@ -390,21 +288,10 @@
</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)
</del><ins>+bool canInjectIDBKeyIntoScriptValue(ExecState&amp; execState, const JSValue&amp; scriptValue, const IDBKeyPath&amp; keyPath)
</ins><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;canInjectIDBKeyIntoScriptValue&quot;);
</span><span class="cx"> 
</span><del>-    JSC::ExecState* exec = requestState-&gt;exec();
-    if (!exec)
-        return false;
-
-    return canInjectIDBKeyIntoScriptValue(*exec, scriptValue, keyPath);
-}
-
-bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&amp; execState, const JSC::JSValue&amp; scriptValue, const IDBKeyPath&amp; keyPath)
-{
-    LOG(StorageAPI, &quot;canInjectIDBKeyIntoScriptValue&quot;);
-
</del><span class="cx">     ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
</span><span class="cx">     Vector&lt;String&gt; keyPathElements;
</span><span class="cx">     IDBKeyPathParseError error;
</span><span class="lines">@@ -417,135 +304,62 @@
</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)
-{
-    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><span class="cx"> 
</span><del>-static JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&amp; exec, const ThreadSafeDataBuffer&amp; valueData, const Vector&lt;String&gt; blobURLs, const Vector&lt;String&gt; blobFilePaths)
</del><ins>+static Strong&lt;Unknown&gt; deserializeIDBValueToJSValue(ExecState&amp; exec, const IDBValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (!valueData.data())
-        return jsUndefined();
</del><ins>+    if (!value.data().data())
+        return { exec.vm(), jsUndefined() };
</ins><span class="cx"> 
</span><del>-    const Vector&lt;uint8_t&gt;&amp; data = *valueData.data();
</del><ins>+    const Vector&lt;uint8_t&gt;&amp; data = *value.data().data();
</ins><span class="cx">     JSValue result;
</span><span class="cx">     if (data.size()) {
</span><span class="cx">         RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::createFromWireBytes(Vector&lt;uint8_t&gt;(data));
</span><span class="cx"> 
</span><span class="cx">         exec.vm().apiLock().lock();
</span><del>-        result = serializedValue-&gt;deserialize(&amp;exec, exec.lexicalGlobalObject(), 0, NonThrowing, blobURLs, blobFilePaths);
</del><ins>+        result = serializedValue-&gt;deserialize(&amp;exec, exec.lexicalGlobalObject(), 0, NonThrowing, value.blobURLs(), value.blobFilePaths());
</ins><span class="cx">         exec.vm().apiLock().unlock();
</span><span class="cx">     } else
</span><span class="cx">         result = jsNull();
</span><span class="cx"> 
</span><del>-    return result;
</del><ins>+    return { exec.vm(), result };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext&amp; context, const ThreadSafeDataBuffer&amp; valueData)
</del><ins>+Strong&lt;Unknown&gt; deserializeIDBValueToJSValue(ScriptExecutionContext&amp; context, const IDBValue&amp; value)
</ins><span class="cx"> {
</span><del>-    DOMRequestState state(&amp;context);
-    auto* execState = state.exec();
-
</del><ins>+    auto* execState = context.execState();
</ins><span class="cx">     if (!execState)
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><del>-    return { execState-&gt;vm(), deserializeIDBValueDataToJSValue(*execState, valueData) };
</del><ins>+    return deserializeIDBValueToJSValue(*execState, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Deprecated::ScriptValue deserializeIDBValue(ScriptExecutionContext&amp; context, const IDBValue&amp; value)
</del><ins>+Strong&lt;Unknown&gt; deserializeIDBValueDataToJSValue(ExecState&amp; exec, const ThreadSafeDataBuffer&amp; valueData)
</ins><span class="cx"> {
</span><del>-    DOMRequestState state(&amp;context);
-    auto* execState = state.exec();
-
-    if (!execState)
-        return { };
-
-    return { execState-&gt;vm(), deserializeIDBValueDataToJSValue(*execState, value.data(), value.blobURLs(), value.blobFilePaths()) };
</del><ins>+    return deserializeIDBValueToJSValue(exec, IDBValue(valueData));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&amp; exec, const ThreadSafeDataBuffer&amp; valueData)
</del><ins>+RefPtr&lt;IDBKey&gt; scriptValueToIDBKey(ExecState&amp; exec, const JSValue&amp; scriptValue)
</ins><span class="cx"> {
</span><del>-    Vector&lt;String&gt; dummyURLs, dummyFilePaths;
-    return deserializeIDBValueDataToJSValue(exec, valueData, dummyURLs, dummyFilePaths);
</del><ins>+    return createIDBKeyFromValue(&amp;exec, scriptValue);
</ins><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 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>+    auto* execState = context.execState();
+    return execState ? scriptValueToIDBKey(*execState, scriptValue) : nullptr;
</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>+Strong&lt;Unknown&gt; idbKeyDataToScriptValue(ScriptExecutionContext&amp; context, const IDBKeyData&amp; keyData)
</ins><span class="cx"> {
</span><del>-    if (buffer.isEmpty())
-        return jsNull();
</del><ins>+    RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; serializedValue = SerializedScriptValue::createFromWireBytes(WTFMove(buffer));
-    return serializedValue-&gt;deserialize(&amp;exec, exec.lexicalGlobalObject(), 0, NonThrowing);
-}
-
-Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState* exec, Vector&lt;uint8_t&gt;&amp;&amp; buffer, bool keyIsDefined)
-{
-    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())
-        return jsUndefined();
-
-    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();
</del><ins>+    ExecState* exec = context.execState();
</ins><span class="cx">     if (!exec)
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><del>-    return Deprecated::ScriptValue(exec-&gt;vm(), idbKeyToJSValue(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), key.get()));
</del><ins>+    return { exec-&gt;vm(), idbKeyToJSValue(exec, jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject()), key.get()) };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-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)
-{
-    RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
-    DOMRequestState requestState(context);
-    return idbKeyToScriptValue(&amp;requestState, key.get());
-}
-
</del><span class="cx"> static Vector&lt;IDBKeyData&gt; createKeyPathArray(ExecState&amp; exec, JSValue value, const IDBIndexInfo&amp; info)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;IDBKeyData&gt; keys;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2014, 2015, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,51 +30,33 @@
</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 IDBValue;
</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 deserializeIDBValue(ScriptExecutionContext&amp;, const IDBValue&amp;);
-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::Strong&lt;JSC::Unknown&gt; idbKeyDataToScriptValue(ScriptExecutionContext&amp;, const IDBKeyData&amp;);
+void generateIndexKeyForValue(JSC::ExecState&amp;, const IDBIndexInfo&amp;, JSC::JSValue, IndexKey&amp; outKey);
</ins><span class="cx"> 
</span><del>-JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&amp;, const ThreadSafeDataBuffer&amp; valueData);
</del><ins>+JSC::Strong&lt;JSC::Unknown&gt; deserializeIDBValueToJSValue(ScriptExecutionContext&amp;, const IDBValue&amp;);
+JSC::Strong&lt;JSC::Unknown&gt; deserializeIDBValueDataToJSValue(JSC::ExecState&amp;, const ThreadSafeDataBuffer&amp; valueData);
</ins><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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -4349,9 +4349,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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-04-17 18:49:53 UTC (rev 199643)
</span><span class="lines">@@ -67,9 +67,10 @@
</span><span class="cx"> GetterRaisesException
</span><span class="cx"> GetterRaisesExceptionWithMessage
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptExecutionContext.h        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h        2016-04-17 18:49:53 UTC (rev 199643)
</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 (199642 => 199643)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-17 18:39:13 UTC (rev 199642)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-17 18:49:53 UTC (rev 199643)
</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">@@ -334,7 +335,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">@@ -381,10 +382,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(idbCursor-&gt;key(*state), String(), true))
+            .setPrimaryKey(m_injectedScript.wrapObject(idbCursor-&gt;primaryKey(*state), String(), true))
+            .setValue(m_injectedScript.wrapObject(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>