<!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>[203465] 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/203465">203465</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-07-20 12:42:53 -0700 (Wed, 20 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Transition most IDB interfaces from ScriptExecutionContext to ExecState.
https://bugs.webkit.org/show_bug.cgi?id=159975

Reviewed by Alex Christensen.

No new tests (No known behavior change).

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:

* Modules/indexeddb/IDBDatabase.idl:

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactory.idl:

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:

* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::only): Deleted.
* Modules/indexeddb/IDBKeyRange.h:

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::requestOpenCursor):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestGetValue):
(WebCore::IDBTransaction::requestGetKey):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::requestPutOrAdd):
* Modules/indexeddb/IDBTransaction.h:

* inspector/InspectorIndexedDBAgent.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCoreModulesindexeddbIDBDatabaseidl">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryh">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryidl">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexh">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexidl">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl</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="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.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 (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/ChangeLog        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2016-07-20  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Transition most IDB interfaces from ScriptExecutionContext to ExecState.
+        https://bugs.webkit.org/show_bug.cgi?id=159975
+
+        Reviewed by Alex Christensen.
+
+        No new tests (No known behavior change).
+
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::continueFunction):
+        (WebCore::IDBCursor::deleteFunction):
+        * Modules/indexeddb/IDBCursor.h:
+        * Modules/indexeddb/IDBCursor.idl:
+
+        * Modules/indexeddb/IDBDatabase.idl:
+
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::IDBFactory::cmp):
+        * Modules/indexeddb/IDBFactory.h:
+        * Modules/indexeddb/IDBFactory.idl:
+
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::count):
+        (WebCore::IDBIndex::doCount):
+        (WebCore::IDBIndex::openKeyCursor):
+        (WebCore::IDBIndex::get):
+        (WebCore::IDBIndex::doGet):
+        (WebCore::IDBIndex::getKey):
+        (WebCore::IDBIndex::doGetKey):
+        * Modules/indexeddb/IDBIndex.h:
+        * Modules/indexeddb/IDBIndex.idl:
+
+        * Modules/indexeddb/IDBKeyRange.cpp:
+        (WebCore::IDBKeyRange::only): Deleted.
+        * Modules/indexeddb/IDBKeyRange.h:
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::openCursor):
+        (WebCore::IDBObjectStore::get):
+        (WebCore::IDBObjectStore::putOrAdd):
+        (WebCore::IDBObjectStore::deleteFunction):
+        (WebCore::IDBObjectStore::doDelete):
+        (WebCore::IDBObjectStore::modernDelete):
+        (WebCore::IDBObjectStore::clear):
+        (WebCore::IDBObjectStore::createIndex):
+        (WebCore::IDBObjectStore::count):
+        (WebCore::IDBObjectStore::doCount):
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::requestOpenCursor):
+        (WebCore::IDBTransaction::doRequestOpenCursor):
+        (WebCore::IDBTransaction::requestGetRecord):
+        (WebCore::IDBTransaction::requestGetValue):
+        (WebCore::IDBTransaction::requestGetKey):
+        (WebCore::IDBTransaction::requestIndexRecord):
+        (WebCore::IDBTransaction::requestCount):
+        (WebCore::IDBTransaction::requestDeleteRecord):
+        (WebCore::IDBTransaction::requestClearObjectStore):
+        (WebCore::IDBTransaction::requestPutOrAdd):
+        * Modules/indexeddb/IDBTransaction.h:
+
+        * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2016-07-20  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Media controls don't appear when pausing a small autoplaying video
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -267,18 +267,11 @@
</span><span class="cx">     uncheckedIterateCursor(IDBKeyData(), count);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBCursor::continueFunction(ScriptExecutionContext&amp; context, JSValue keyValue, ExceptionCodeWithMessage&amp; ec)
</del><ins>+void IDBCursor::continueFunction(ExecState&amp; execState, JSValue keyValue, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'continue' on 'IDBCursor': Script execution context does not have an execution state.&quot;);
-        return;
-    }
-
</del><span class="cx">     RefPtr&lt;IDBKey&gt; key;
</span><span class="cx">     if (!keyValue.isUndefined())
</span><del>-        key = scriptValueToIDBKey(*exec, keyValue);
</del><ins>+        key = scriptValueToIDBKey(execState, keyValue);
</ins><span class="cx"> 
</span><span class="cx">     continueFunction(key.get(), ec);
</span><span class="cx"> }
</span><span class="lines">@@ -344,7 +337,7 @@
</span><span class="cx">     transaction().iterateCursor(*this, key, count);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::deleteFunction(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;WebCore::IDBRequest&gt; IDBCursor::deleteFunction(ExecState&amp; execState, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBCursor::deleteFunction&quot;);
</span><span class="cx">     ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
</span><span class="lines">@@ -379,7 +372,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto request = effectiveObjectStore().modernDelete(context, m_currentPrimaryKey.get(), ec);
</del><ins>+    auto request = effectiveObjectStore().modernDelete(execState, m_currentPrimaryKey.get(), ec);
</ins><span class="cx">     if (ec.code)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -64,8 +64,8 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; update(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     void advance(unsigned, ExceptionCodeWithMessage&amp;);
</span><del>-    void continueFunction(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</del><ins>+    void continueFunction(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; deleteFunction(JSC::ExecState&amp;, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void continueFunction(const IDBKeyData&amp;, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -38,6 +38,6 @@
</span><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><del>-    [CallWith=ScriptExecutionContext, ImplementedAs=continueFunction, RaisesExceptionWithMessage] void continue(optional any key);
-    [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete();
</del><ins>+    [CallWith=ScriptState, ImplementedAs=continueFunction, RaisesExceptionWithMessage] void continue(optional any key);
+    [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -36,8 +36,8 @@
</span><span class="cx"> 
</span><span class="cx">     [Custom, RaisesExceptionWithMessage] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
</span><span class="cx">     [RaisesExceptionWithMessage] void deleteObjectStore(DOMString name);
</span><del>-    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode);
-    [Custom, CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBTransaction transaction(sequence&lt;DOMString&gt; storeNames, optional DOMString mode);
</del><ins>+    [Custom, RaisesExceptionWithMessage] IDBTransaction transaction(DOMString storeName, optional DOMString mode);
+    [Custom, RaisesExceptionWithMessage] IDBTransaction transaction(sequence&lt;DOMString&gt; storeNames, optional DOMString mode);
</ins><span class="cx">     void close();
</span><span class="cx"> 
</span><span class="cx">     attribute EventHandler onabort;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -142,18 +142,11 @@
</span><span class="cx">     return m_connectionProxy-&gt;deleteDatabase(context, databaseIdentifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-short IDBFactory::cmp(ScriptExecutionContext&amp; context, JSValue firstValue, JSValue secondValue, ExceptionCodeWithMessage&amp; ec)
</del><ins>+short IDBFactory::cmp(ExecState&amp; execState, JSValue firstValue, JSValue secondValue, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'cmp' on 'IDBFactory': Script execution context does not have an execution state.&quot;);
-        return 0;
-    }
</del><ins>+    Ref&lt;IDBKey&gt; first = scriptValueToIDBKey(execState, firstValue);
+    Ref&lt;IDBKey&gt; second = scriptValueToIDBKey(execState, secondValue);
</ins><span class="cx"> 
</span><del>-    Ref&lt;IDBKey&gt; first = scriptValueToIDBKey(*exec, firstValue);
-    Ref&lt;IDBKey&gt; second = scriptValueToIDBKey(*exec, secondValue);
-
</del><span class="cx">     if (!first-&gt;isValid() || !second-&gt;isValid()) {
</span><span class="cx">         ec.code = IDBDatabaseException::DataError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><ins>+class ExecState;
</ins><span class="cx"> class JSValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -59,7 +60,7 @@
</span><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, Optional&lt;uint64_t&gt; version, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span><del>-    short cmp(ScriptExecutionContext&amp;, JSC::JSValue first, JSC::JSValue second, ExceptionCodeWithMessage&amp;);
</del><ins>+    short cmp(JSC::ExecState&amp;, JSC::JSValue first, JSC::JSValue second, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void getAllDatabaseNames(const SecurityOrigin&amp; mainFrameOrigin, const SecurityOrigin&amp; openingOrigin, std::function&lt;void (const Vector&lt;String&gt;&amp;)&gt;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -30,6 +30,6 @@
</span><span class="cx"> ] interface IDBFactory {
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBOpenDBRequest deleteDatabase(DOMString name);
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] short cmp(any first, any second);
</del><ins>+    [CallWith=ScriptState, RaisesExceptionWithMessage] short cmp(any first, any second);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     return m_info.multiEntry();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ExecState&amp; execState, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="lines">@@ -132,42 +132,35 @@
</span><span class="cx">         rangeData.upperKey = IDBKeyData::maximum();
</span><span class="cx"> 
</span><span class="cx">     auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), rangeData, direction, IndexedDB::CursorType::KeyAndValue);
</span><del>-    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
</del><ins>+    return m_objectStore.modernTransaction().requestOpenCursor(execState, *this, info);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ScriptExecutionContext&amp; context, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::openCursor(ExecState&amp; execState, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::openCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
</del><ins>+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(execState, key, ec.code);
</ins><span class="cx">     if (ec.code) {
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return openCursor(context, keyRange.get(), direction, ec);
</del><ins>+    return openCursor(execState, keyRange.get(), direction, ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::count(ExecState&amp; execState, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::count&quot;);
</span><span class="cx"> 
</span><del>-    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
</del><ins>+    return doCount(execState, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::count(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::count&quot;);
</span><span class="cx"> 
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBIndex': Script execution context does not have an execution state.&quot;);
-        return 0;
-    }
-
-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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">@@ -174,10 +167,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return doCount(context, IDBKeyRangeData(idbKey.ptr()), ec);
</del><ins>+    return doCount(execState, IDBKeyRangeData(idbKey.ptr()), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::doCount(ExecState&amp; execState, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="cx"> 
</span><span class="lines">@@ -199,10 +192,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return transaction.requestCount(context, *this, range);
</del><ins>+    return transaction.requestCount(execState, *this, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ExecState&amp; execState, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="lines">@@ -226,39 +219,32 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
</span><del>-    return m_objectStore.modernTransaction().requestOpenCursor(context, *this, info);
</del><ins>+    return m_objectStore.modernTransaction().requestOpenCursor(execState, *this, info);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ScriptExecutionContext&amp; context, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::openKeyCursor(ExecState&amp; execState, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::openKeyCursor&quot;);
</span><del>-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
</del><ins>+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(execState, key, ec.code);
</ins><span class="cx">     if (ec.code) {
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.&quot;);
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><del>-    return openKeyCursor(context, keyRange.get(), direction, ec);
</del><ins>+    return openKeyCursor(execState, keyRange.get(), direction, ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::get(ExecState&amp; execState, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::get&quot;);
</span><span class="cx"> 
</span><del>-    return doGet(context, IDBKeyRangeData(range), ec);
</del><ins>+    return doGet(execState, IDBKeyRangeData(range), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::get(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::get(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::get&quot;);
</span><span class="cx"> 
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': Script execution context does not have an execution state.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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">@@ -265,10 +251,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return doGet(context, IDBKeyRangeData(idbKey.ptr()), ec);
</del><ins>+    return doGet(execState, IDBKeyRangeData(idbKey.ptr()), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::doGet(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::doGet(ExecState&amp; execState, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="cx"> 
</span><span class="lines">@@ -290,28 +276,21 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return transaction.requestGetValue(context, *this, range);
</del><ins>+    return transaction.requestGetValue(execState, *this, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ExecState&amp; execState, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
</span><span class="cx"> 
</span><del>-    return doGetKey(context, IDBKeyRangeData(range), ec);
</del><ins>+    return doGetKey(execState, IDBKeyRangeData(range), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::getKey(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::getKey&quot;);
</span><span class="cx"> 
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBIndex': Script execution context does not have an execution state.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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 class="lines">@@ -318,10 +297,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return doGetKey(context, IDBKeyRangeData(idbKey.ptr()), ec);
</del><ins>+    return doGetKey(execState, IDBKeyRangeData(idbKey.ptr()), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::doGetKey(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBIndex::doGetKey(ExecState&amp; execState, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
</span><span class="cx"> 
</span><span class="lines">@@ -343,7 +322,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return transaction.requestGetKey(context, *this, range);
</del><ins>+    return transaction.requestGetKey(execState, *this, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBIndex::markAsDeleted()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -31,6 +31,10 @@
</span><span class="cx"> #include &quot;IDBIndexInfo.h&quot;
</span><span class="cx"> #include &quot;IDBRequest.h&quot;
</span><span class="cx"> 
</span><ins>+namespace JSC {
+class ExecState;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBKeyRange;
</span><span class="lines">@@ -49,19 +53,19 @@
</span><span class="cx">     bool unique() const;
</span><span class="cx">     bool multiEntry() const;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; openCursor(JSC::ExecState&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(JSC::ExecState&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; count(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; openKeyCursor(ScriptExecutionContext&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; openKeyCursor(JSC::ExecState&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openKeyCursor(JSC::ExecState&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; getKey(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; get(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; getKey(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; getKey(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     const IDBIndexInfo&amp; info() const { return m_info; }
</span><span class="cx"> 
</span><span class="lines">@@ -74,9 +78,9 @@
</span><span class="cx">     void deref();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    RefPtr&lt;IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; doGet(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; doGetKey(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; doCount(JSC::ExecState&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doGet(JSC::ExecState&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doGetKey(JSC::ExecState&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     const char* activeDOMObjectName() const final;
</span><span class="cx">     bool canSuspendForDocumentSuspension() const final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -36,17 +36,17 @@
</span><span class="cx">     readonly attribute boolean multiEntry;
</span><span class="cx">     readonly attribute boolean unique;
</span><span class="cx"> 
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = &quot;next&quot;);
</del><ins>+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = &quot;next&quot;);
</ins><span class="cx"> 
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openKeyCursor(any key, optional DOMString direction = &quot;next&quot;);
</del><ins>+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openKeyCursor(any key, optional DOMString direction = &quot;next&quot;);
</ins><span class="cx"> 
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(IDBKeyRange? key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(any key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</del><ins>+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest get(any key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest getKey(IDBKeyRange? key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest getKey(any key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest count(any key);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -77,15 +77,6 @@
</span><span class="cx">     return only(scriptValueToIDBKey(state, keyValue), ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::only(ScriptExecutionContext&amp; context, JSValue keyValue, ExceptionCode&amp; ec)
-{
-    auto exec = context.execState();
-    if (!exec)
-        return nullptr;
-
-    return only(scriptValueToIDBKey(*exec, keyValue), ec);
-}
-
</del><span class="cx"> RefPtr&lt;IDBKeyRange&gt; IDBKeyRange::lowerBound(ExecState&amp; state, JSValue boundValue, bool open, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     auto bound = scriptValueToIDBKey(state, boundValue);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -62,9 +62,6 @@
</span><span class="cx"> 
</span><span class="cx">     static RefPtr&lt;IDBKeyRange&gt; bound(JSC::ExecState&amp;, JSC::JSValue lower, JSC::JSValue upper, bool lowerOpen, bool upperOpen, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    // FIXME: Eventually should probably change all callers to call the ExecState version.
-    static RefPtr&lt;IDBKeyRange&gt; only(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCode&amp;);
-
</del><span class="cx">     WEBCORE_EXPORT bool isOnlyKey() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">     return m_info.autoIncrement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ExecState&amp; execState, IDBKeyRange* range, const String&amp; directionString, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::openCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="lines">@@ -146,32 +146,25 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto info = IDBCursorInfo::objectStoreCursor(m_transaction.get(), m_info.identifier(), range, direction);
</span><del>-    return m_transaction-&gt;requestOpenCursor(context, *this, info);
</del><ins>+    return m_transaction-&gt;requestOpenCursor(execState, *this, info);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ScriptExecutionContext&amp; context, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::openCursor(ExecState&amp; execState, JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(context, key, ec.code);
</del><ins>+    RefPtr&lt;IDBKeyRange&gt; keyRange = IDBKeyRange::only(execState, key, ec.code);
</ins><span class="cx">     if (ec.code) {
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.&quot;);
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return openCursor(context, keyRange.get(), direction, ec);
</del><ins>+    return openCursor(execState, keyRange.get(), direction, ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="cx"> 
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': Script execution context does not have an execution state.&quot;);
-        return nullptr;
-    }
-
</del><span class="cx">     if (!m_transaction-&gt;isActive()) {
</span><span class="cx">         ec.code = IDBDatabaseException::TransactionInactiveError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.&quot;);
</span><span class="lines">@@ -184,7 +177,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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">@@ -191,10 +184,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_transaction-&gt;requestGetRecord(context, *this, idbKey.ptr());
</del><ins>+    return m_transaction-&gt;requestGetRecord(execState, *this, idbKey.ptr());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::get(ExecState&amp; execState, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::get&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="lines">@@ -216,7 +209,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_transaction-&gt;requestGetRecord(context, *this, keyRangeData);
</del><ins>+    return m_transaction-&gt;requestGetRecord(execState, *this, keyRangeData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBObjectStore::add(ExecState&amp; execState, JSValue value, JSValue key, ExceptionCodeWithMessage&amp; ec)
</span><span class="lines">@@ -343,15 +336,15 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_transaction-&gt;requestPutOrAdd(*context, *this, key.get(), *serializedValue, overwriteMode);
</del><ins>+    return m_transaction-&gt;requestPutOrAdd(state, *this, key.get(), *serializedValue, overwriteMode);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ExecState&amp; execState, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    return doDelete(context, keyRange, ec);
</del><ins>+    return doDelete(execState, keyRange, ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::doDelete(ScriptExecutionContext&amp; context, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::doDelete(ExecState&amp; execState, IDBKeyRange* keyRange, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::deleteFunction&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="lines">@@ -386,24 +379,17 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_transaction-&gt;requestDeleteRecord(context, *this, keyRangeData);
</del><ins>+    return m_transaction-&gt;requestDeleteRecord(execState, *this, keyRangeData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::deleteFunction(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    return modernDelete(context, key, ec);
</del><ins>+    return modernDelete(execState, key, ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::modernDelete(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::modernDelete(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'delete' on 'IDBObjectStore': Script execution context does not have an execution state.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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">@@ -410,10 +396,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return doDelete(context, &amp;IDBKeyRange::create(WTFMove(idbKey)).get(), ec);
</del><ins>+    return doDelete(execState, &amp;IDBKeyRange::create(WTFMove(idbKey)).get(), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::clear(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::clear(ExecState&amp; execState, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::clear&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="lines">@@ -441,11 +427,11 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestClearObjectStore(context, *this);
</del><ins>+    Ref&lt;IDBRequest&gt; request = m_transaction-&gt;requestClearObjectStore(execState, *this);
</ins><span class="cx">     return adoptRef(request.leakRef());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBIndex&gt; IDBObjectStore::createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp; keyPath, const IndexParameters&amp; parameters, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBIndex&gt; IDBObjectStore::createIndex(ExecState&amp;, const String&amp; name, const IDBKeyPath&amp; keyPath, const IndexParameters&amp; parameters, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::createIndex %s&quot;, name.utf8().data());
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="lines">@@ -590,18 +576,11 @@
</span><span class="cx">     m_transaction-&gt;deleteIndex(m_info.identifier(), name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ExecState&amp; execState, JSValue key, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
</span><span class="cx"> 
</span><del>-    auto exec = context.execState();
-    if (!exec) {
-        ec.code = IDBDatabaseException::UnknownError;
-        ec.message = ASCIILiteral(&quot;Failed to execute 'count' on 'IDBObjectStore': Script execution context does not have an execution state.&quot;);
-        return nullptr;
-    }
-
-    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(*exec, key);
</del><ins>+    Ref&lt;IDBKey&gt; idbKey = scriptValueToIDBKey(execState, key);
</ins><span class="cx">     if (!idbKey-&gt;isValid()) {
</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 class="lines">@@ -608,17 +587,17 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return doCount(context, IDBKeyRangeData(idbKey.ptr()), ec);
</del><ins>+    return doCount(execState, IDBKeyRangeData(idbKey.ptr()), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ExecState&amp; execState, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
</span><span class="cx"> 
</span><del>-    return doCount(context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
</del><ins>+    return doCount(execState, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::doCount(ScriptExecutionContext&amp; context, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBRequest&gt; IDBObjectStore::doCount(ExecState&amp; execState, const IDBKeyRangeData&amp; range, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(currentThread() == m_transaction-&gt;database().originThreadID());
</span><span class="cx"> 
</span><span class="lines">@@ -644,7 +623,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return m_transaction-&gt;requestCount(context, *this, range);
</del><ins>+    return m_transaction-&gt;requestCount(execState, *this, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBObjectStore::markAsDeleted()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -70,23 +70,23 @@
</span><span class="cx">         bool multiEntry;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; openCursor(JSC::ExecState&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; openCursor(JSC::ExecState&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; get(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</ins><span class="cx">     RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><del>-    RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; clear(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp;, const IndexParameters&amp;, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; deleteFunction(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; deleteFunction(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; clear(JSC::ExecState&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBIndex&gt; createIndex(JSC::ExecState&amp;, const String&amp; name, const IDBKeyPath&amp;, const IndexParameters&amp;, ExceptionCodeWithMessage&amp;);
</ins><span class="cx">     RefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     void deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><del>-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; count(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; count(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; putForCursorUpdate(JSC::ExecState&amp;, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><del>-    RefPtr&lt;IDBRequest&gt; modernDelete(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; modernDelete(JSC::ExecState&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void markAsDeleted();
</span><span class="cx">     bool isDeleted() const { return m_deleted; }
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx"> 
</span><span class="cx">     enum class InlineKeyCheck { Perform, DoNotPerform };
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; putOrAdd(JSC::ExecState&amp;, JSC::JSValue, RefPtr&lt;IDBKey&gt;, IndexedDB::ObjectStoreOverwriteMode, InlineKeyCheck, ExceptionCodeWithMessage&amp;);
</span><del>-    RefPtr&lt;IDBRequest&gt; doCount(ScriptExecutionContext&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; doDelete(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBRequest&gt; doCount(JSC::ExecState&amp;, const IDBKeyRangeData&amp;, ExceptionCodeWithMessage&amp;);
+    RefPtr&lt;IDBRequest&gt; doDelete(JSC::ExecState&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     const char* activeDOMObjectName() const final;
</span><span class="cx">     bool canSuspendForDocumentSuspension() const final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -38,19 +38,19 @@
</span><span class="cx"> 
</span><span class="cx">     [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest put(any value, optional any key);
</span><span class="cx">     [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest add(any value, optional any key);
</span><del>-    [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(IDBKeyRange? keyRange);
-    [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(any key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest clear();
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = &quot;next&quot;);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, sequence&lt;DOMString&gt; keyPath, optional IDBIndexParameters options);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, DOMString keyPath, optional IDBIndexParameters options);
</del><ins>+    [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(IDBKeyRange? keyRange);
+    [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesExceptionWithMessage] IDBRequest delete(any key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest get(IDBKeyRange? key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest get(any key);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest clear();
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openCursor(optional IDBKeyRange? range = null, optional DOMString direction = &quot;next&quot;);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest openCursor(any key, optional DOMString direction = &quot;next&quot;);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, sequence&lt;DOMString&gt; keyPath, optional IDBIndexParameters options);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, DOMString keyPath, optional IDBIndexParameters options);
</ins><span class="cx">     [RaisesExceptionWithMessage] IDBIndex index(DOMString name);
</span><span class="cx">     [RaisesExceptionWithMessage] void deleteIndex(DOMString name);
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</del><ins>+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
+    [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest count(any key);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> dictionary IDBIndexParameters {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -49,9 +49,12 @@
</span><span class="cx"> #include &quot;JSDOMWindowBase.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><ins>+#include &quot;ScriptState.h&quot;
</ins><span class="cx"> #include &quot;TransactionOperation.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; IDBTransaction::modeReadOnly()
</span><span class="lines">@@ -645,31 +648,34 @@
</span><span class="cx">     abortDueToFailedRequest(DOMError::create(IDBDatabaseException::getErrorName(resultData.error().code()), resultData.error().message()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ExecState&amp; execState, IDBObjectStore&amp; objectStore, const IDBCursorInfo&amp; info)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, objectStore, info));
</del><ins>+    return doRequestOpenCursor(execState, IDBCursorWithValue::create(*this, objectStore, info));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestOpenCursor(ExecState&amp; execState, IDBIndex&amp; index, const IDBCursorInfo&amp; info)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestOpenCursor&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><span class="cx">     if (info.cursorType() == IndexedDB::CursorType::KeyOnly)
</span><del>-        return doRequestOpenCursor(context, IDBCursor::create(*this, index, info));
</del><ins>+        return doRequestOpenCursor(execState, IDBCursor::create(*this, index, info));
</ins><span class="cx"> 
</span><del>-    return doRequestOpenCursor(context, IDBCursorWithValue::create(*this, index, info));
</del><ins>+    return doRequestOpenCursor(execState, IDBCursorWithValue::create(*this, index, info));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::doRequestOpenCursor(ScriptExecutionContext&amp; context, Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::doRequestOpenCursor(ExecState&amp; execState, Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isActive());
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, cursor.get(), *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), cursor.get(), *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didOpenCursorOnServer, &amp;IDBTransaction::openCursorOnServer, cursor-&gt;info());
</span><span class="lines">@@ -723,7 +729,7 @@
</span><span class="cx">     request.didOpenOrIterateCursor(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; keyRangeData)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetRecord(ExecState&amp; execState, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; keyRangeData)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestGetRecord&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -730,7 +736,10 @@
</span><span class="cx">     ASSERT(!keyRangeData.isNull);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, keyRangeData);
</span><span class="lines">@@ -739,23 +748,23 @@
</span><span class="cx">     return request;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetValue(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetValue(ExecState&amp; execState, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Value, range);
</del><ins>+    return requestIndexRecord(execState, index, IndexedDB::IndexRecordType::Value, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestGetKey(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestGetKey(ExecState&amp; execState, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    return requestIndexRecord(context, index, IndexedDB::IndexRecordType::Key, range);
</del><ins>+    return requestIndexRecord(execState, index, IndexedDB::IndexRecordType::Key, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestIndexRecord(ScriptExecutionContext&amp; context, IDBIndex&amp; index, IndexedDB::IndexRecordType type, const IDBKeyRangeData&amp;range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestIndexRecord(ExecState&amp; execState, IDBIndex&amp; index, IndexedDB::IndexRecordType type, const IDBKeyRangeData&amp;range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestGetValue&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -762,7 +771,10 @@
</span><span class="cx">     ASSERT(!range.isNull);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::createGet(context, index, type, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::createGet(*scriptExecutionContext(), index, type, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetRecordOnServer, &amp;IDBTransaction::getRecordOnServer, range);
</span><span class="lines">@@ -808,7 +820,7 @@
</span><span class="cx">     request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ExecState&amp; execState, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBObjectStore)&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -815,7 +827,10 @@
</span><span class="cx">     ASSERT(!range.isNull);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
</span><span class="lines">@@ -823,7 +838,7 @@
</span><span class="cx">     return request;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ScriptExecutionContext&amp; context, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestCount(ExecState&amp; execState, IDBIndex&amp; index, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestCount (IDBIndex)&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -830,7 +845,10 @@
</span><span class="cx">     ASSERT(!range.isNull);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::createCount(context, index, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::createCount(*scriptExecutionContext(), index, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didGetCountOnServer, &amp;IDBTransaction::getCountOnServer, range));
</span><span class="lines">@@ -855,7 +873,7 @@
</span><span class="cx">     request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestDeleteRecord(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestDeleteRecord(ExecState&amp; execState, IDBObjectStore&amp; objectStore, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestDeleteRecord&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -862,7 +880,10 @@
</span><span class="cx">     ASSERT(!range.isNull);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didDeleteRecordOnServer, &amp;IDBTransaction::deleteRecordOnServer, range));
</span><span class="lines">@@ -886,13 +907,16 @@
</span><span class="cx">     request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestClearObjectStore(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestClearObjectStore(ExecState&amp; execState, IDBObjectStore&amp; objectStore)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestClearObjectStore&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     uint64_t objectStoreIdentifier = objectStore.info().identifier();
</span><span class="lines">@@ -919,7 +943,7 @@
</span><span class="cx">     request.requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;IDBRequest&gt; IDBTransaction::requestPutOrAdd(ScriptExecutionContext&amp; context, IDBObjectStore&amp; objectStore, IDBKey* key, SerializedScriptValue&amp; value, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</del><ins>+Ref&lt;IDBRequest&gt; IDBTransaction::requestPutOrAdd(ExecState&amp; execState, IDBObjectStore&amp; objectStore, IDBKey* key, SerializedScriptValue&amp; value, IndexedDB::ObjectStoreOverwriteMode overwriteMode)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBTransaction::requestPutOrAdd&quot;);
</span><span class="cx">     ASSERT(isActive());
</span><span class="lines">@@ -927,7 +951,10 @@
</span><span class="cx">     ASSERT(objectStore.info().autoIncrement() || key);
</span><span class="cx">     ASSERT(currentThread() == m_database-&gt;originThreadID());
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; request = IDBRequest::create(context, objectStore, *this);
</del><ins>+    RELEASE_ASSERT(scriptExecutionContext());
+    ASSERT_UNUSED(execState, scriptExecutionContext() == scriptExecutionContextFromExecState(&amp;execState));
+
+    Ref&lt;IDBRequest&gt; request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</ins><span class="cx">     addRequest(request.get());
</span><span class="cx"> 
</span><span class="cx">     auto operation = IDBClient::createTransactionOperation(*this, request.get(), &amp;IDBTransaction::didPutOrAddOnServer, &amp;IDBTransaction::putOrAddOnServer, key, &amp;value, overwriteMode);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -113,16 +113,16 @@
</span><span class="cx">     Ref&lt;IDBObjectStore&gt; createObjectStore(const IDBObjectStoreInfo&amp;);
</span><span class="cx">     std::unique_ptr&lt;IDBIndex&gt; createIndex(IDBObjectStore&amp;, const IDBIndexInfo&amp;);
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; requestPutOrAdd(ScriptExecutionContext&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
-    Ref&lt;IDBRequest&gt; requestGetRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestDeleteRecord(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestClearObjectStore(ScriptExecutionContext&amp;, IDBObjectStore&amp;);
-    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestCount(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestGetValue(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestGetKey(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
-    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
-    Ref&lt;IDBRequest&gt; requestOpenCursor(ScriptExecutionContext&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</del><ins>+    Ref&lt;IDBRequest&gt; requestPutOrAdd(JSC::ExecState&amp;, IDBObjectStore&amp;, IDBKey*, SerializedScriptValue&amp;, IndexedDB::ObjectStoreOverwriteMode);
+    Ref&lt;IDBRequest&gt; requestGetRecord(JSC::ExecState&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestDeleteRecord(JSC::ExecState&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestClearObjectStore(JSC::ExecState&amp;, IDBObjectStore&amp;);
+    Ref&lt;IDBRequest&gt; requestCount(JSC::ExecState&amp;, IDBObjectStore&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestCount(JSC::ExecState&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestGetValue(JSC::ExecState&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestGetKey(JSC::ExecState&amp;, IDBIndex&amp;, const IDBKeyRangeData&amp;);
+    Ref&lt;IDBRequest&gt; requestOpenCursor(JSC::ExecState&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
+    Ref&lt;IDBRequest&gt; requestOpenCursor(JSC::ExecState&amp;, IDBIndex&amp;, const IDBCursorInfo&amp;);
</ins><span class="cx">     void iterateCursor(IDBCursor&amp;, const IDBKeyData&amp;, unsigned long count);
</span><span class="cx"> 
</span><span class="cx">     void deleteObjectStore(const String&amp; objectStoreName);
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">     void fireOnAbort();
</span><span class="cx">     void enqueueEvent(Ref&lt;Event&gt;&amp;&amp;);
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; requestIndexRecord(ScriptExecutionContext&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
</del><ins>+    Ref&lt;IDBRequest&gt; requestIndexRecord(JSC::ExecState&amp;, IDBIndex&amp;, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void commitOnServer(IDBClient::TransactionOperation&amp;);
</span><span class="cx">     void abortOnServerAndCancelRequests(IDBClient::TransactionOperation&amp;);
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">     void deleteIndexOnServer(IDBClient::TransactionOperation&amp;, const uint64_t&amp; objectStoreIdentifier, const String&amp; indexName);
</span><span class="cx">     void didDeleteIndexOnServer(const IDBResultData&amp;);
</span><span class="cx"> 
</span><del>-    Ref&lt;IDBRequest&gt; doRequestOpenCursor(ScriptExecutionContext&amp;, Ref&lt;IDBCursor&gt;&amp;&amp;);
</del><ins>+    Ref&lt;IDBRequest&gt; doRequestOpenCursor(JSC::ExecState&amp;, Ref&lt;IDBCursor&gt;&amp;&amp;);
</ins><span class="cx">     void openCursorOnServer(IDBClient::TransactionOperation&amp;, const IDBCursorInfo&amp;);
</span><span class="cx">     void didOpenCursorOnServer(IDBRequest&amp;, const IDBResultData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (203464 => 203465)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-07-20 19:25:16 UTC (rev 203464)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-07-20 19:42:53 UTC (rev 203465)
</span><span class="lines">@@ -486,6 +486,7 @@
</span><span class="cx">         TransactionActivator activator(idbTransaction.get());
</span><span class="cx">         ExceptionCodeWithMessage ec;
</span><span class="cx">         RefPtr&lt;IDBRequest&gt; idbRequest;
</span><ins>+        JSC::ExecState* exec = context() ? context()-&gt;execState() : nullptr;
</ins><span class="cx">         if (!m_indexName.isEmpty()) {
</span><span class="cx">             RefPtr&lt;IDBIndex&gt; idbIndex = indexForObjectStore(idbObjectStore.get(), m_indexName);
</span><span class="cx">             if (!idbIndex) {
</span><span class="lines">@@ -493,9 +494,9 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            idbRequest = idbIndex-&gt;openCursor(*context(), m_idbKeyRange.get(), IDBCursor::directionNext(), ec);
</del><ins>+            idbRequest = exec ? idbIndex-&gt;openCursor(*exec, m_idbKeyRange.get(), IDBCursor::directionNext(), ec) : nullptr;
</ins><span class="cx">         } else
</span><del>-            idbRequest = idbObjectStore-&gt;openCursor(*context(), m_idbKeyRange.get(), IDBCursor::directionNext(), ec);
</del><ins>+            idbRequest = exec ? idbObjectStore-&gt;openCursor(*exec, m_idbKeyRange.get(), IDBCursor::directionNext(), ec) : nullptr;
</ins><span class="cx"> 
</span><span class="cx">         if (!idbRequest) {
</span><span class="cx">             m_requestCallback-&gt;sendFailure(&quot;Could not open cursor to populate database data&quot;);
</span><span class="lines">@@ -718,7 +719,8 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         ExceptionCodeWithMessage ec;
</span><del>-        RefPtr&lt;IDBRequest&gt; idbRequest = idbObjectStore-&gt;clear(*context(), ec);
</del><ins>+        JSC::ExecState* exec = context() ? context()-&gt;execState() : nullptr;
+        RefPtr&lt;IDBRequest&gt; idbRequest = exec ? idbObjectStore-&gt;clear(*exec, ec) : nullptr;
</ins><span class="cx">         ASSERT(!ec.code);
</span><span class="cx">         if (ec.code) {
</span><span class="cx">             m_requestCallback-&gt;sendFailure(String::format(&quot;Could not clear object store '%s': %d&quot;, m_objectStoreName.utf8().data(), ec.code));
</span></span></pre>
</div>
</div>

</body>
</html>