Title: [199323] trunk/Source/WebCore
Revision
199323
Author
[email protected]
Date
2016-04-11 16:49:34 -0700 (Mon, 11 Apr 2016)

Log Message

Unreviewed, rolling out r199310.
https://bugs.webkit.org/show_bug.cgi?id=156483

This change turns many indexeddb tests into crashes (Requested
by jwtan on #webkit).

Reverted changeset:

"Clean up IDBBindingUtilities."
https://bugs.webkit.org/show_bug.cgi?id=156472
http://trac.webkit.org/changeset/199310

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (199322 => 199323)


--- trunk/Source/WebCore/ChangeLog	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/ChangeLog	2016-04-11 23:49:34 UTC (rev 199323)
@@ -1,5 +1,19 @@
 2016-04-11  Commit Queue  <[email protected]>
 
+        Unreviewed, rolling out r199310.
+        https://bugs.webkit.org/show_bug.cgi?id=156483
+
+        This change turns many indexeddb tests into crashes (Requested
+        by jwtan on #webkit).
+
+        Reverted changeset:
+
+        "Clean up IDBBindingUtilities."
+        https://bugs.webkit.org/show_bug.cgi?id=156472
+        http://trac.webkit.org/changeset/199310
+
+2016-04-11  Commit Queue  <[email protected]>
+
         Unreviewed, rolling out r199315.
         https://bugs.webkit.org/show_bug.cgi?id=156482
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -78,7 +78,7 @@
 {
 }
 
-IDBAny::IDBAny(const JSC::JSValue& value)
+IDBAny::IDBAny(const Deprecated::ScriptValue& value)
     : m_type(IDBAny::Type::ScriptValue)
     , m_scriptValue(value)
 {
@@ -133,7 +133,7 @@
     return nullptr;
 }
 
-JSC::JSValue IDBAny::scriptValue()
+const Deprecated::ScriptValue& IDBAny::scriptValue()
 {
     return m_scriptValue;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBAny.h (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBAny.h	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBAny.h	2016-04-11 23:49:34 UTC (rev 199323)
@@ -29,7 +29,7 @@
 
 #include "IDBKeyPath.h"
 #include "ScriptWrappable.h"
-#include <runtime/JSCJSValue.h>
+#include <bindings/ScriptValue.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -70,7 +70,7 @@
         return adoptRef(new IDBAny(keyPath));
     }
 
-    static RefPtr<IDBAny> create(const JSC::JSValue& value)
+    static RefPtr<IDBAny> create(const Deprecated::ScriptValue& value)
     {
         return adoptRef(new IDBAny(value));
     }
@@ -108,7 +108,7 @@
     RefPtr<IDBIndex> idbIndex();
     RefPtr<IDBObjectStore> idbObjectStore();
     RefPtr<IDBTransaction> idbTransaction();
-    JSC::JSValue scriptValue();
+    const Deprecated::ScriptValue& scriptValue();
     int64_t integer();
     const String& string();
     const IDBKeyPath& keyPath();
@@ -120,7 +120,7 @@
     explicit IDBAny(Ref<IDBIndex>&&);
     explicit IDBAny(Ref<IDBCursor>&&);
     explicit IDBAny(const IDBKeyPath&);
-    explicit IDBAny(const JSC::JSValue&);
+    explicit IDBAny(const Deprecated::ScriptValue&);
 
     IDBAny::Type m_type { IDBAny::Type::Undefined };
     RefPtr<IDBDatabase> m_database;
@@ -130,7 +130,7 @@
     RefPtr<IDBCursorWithValue> m_cursorWithValue;
 
     const IDBKeyPath m_idbKeyPath;
-    const JSC::JSValue m_scriptValue;
+    const Deprecated::ScriptValue m_scriptValue;
     const String m_string;
     const int64_t m_integer { 0 };
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -40,8 +40,6 @@
 #include "ScriptExecutionContext.h"
 #include <wtf/NeverDestroyed.h>
 
-using namespace JSC;
-
 namespace WebCore {
 
 const AtomicString& IDBCursor::directionNext()
@@ -159,19 +157,19 @@
     return IDBCursor::directionToString(m_info.cursorDirection());
 }
 
-JSValue IDBCursor::key(ExecState&) const
+const Deprecated::ScriptValue& IDBCursor::key() const
 {
-    return m_currentKey;
+    return m_deprecatedCurrentKey;
 }
 
-JSValue IDBCursor::primaryKey(ExecState&) const
+const Deprecated::ScriptValue& IDBCursor::primaryKey() const
 {
-    return m_currentPrimaryKey;
+    return m_deprecatedCurrentPrimaryKey;
 }
 
-JSValue IDBCursor::value(ExecState&) const
+const Deprecated::ScriptValue& IDBCursor::value() const
 {
-    return m_currentValue;
+    return m_deprecatedCurrentValue;
 }
 
 IDBAny* IDBCursor::source()
@@ -226,7 +224,7 @@
         }
     }
 
-    auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_currentPrimaryKey, ec);
+    auto request = effectiveObjectStore().putForCursorUpdate(exec, value.jsValue(), m_deprecatedCurrentPrimaryKey.jsValue(), ec);
     if (ec.code)
         return nullptr;
 
@@ -282,9 +280,10 @@
 
 void IDBCursor::continueFunction(ScriptExecutionContext& context, const Deprecated::ScriptValue& keyValue, ExceptionCodeWithMessage& ec)
 {
+    DOMRequestState requestState(&context);
     RefPtr<IDBKey> key;
     if (!keyValue.jsValue().isUndefined())
-        key = scriptValueToIDBKey(context, keyValue);
+        key = scriptValueToIDBKey(&requestState, keyValue);
 
     continueFunction(key.get(), ec);
 }
@@ -381,7 +380,7 @@
         return nullptr;
     }
 
-    auto request = effectiveObjectStore().modernDelete(context, m_currentPrimaryKey, ec);
+    auto request = effectiveObjectStore().modernDelete(context, m_deprecatedCurrentPrimaryKey.jsValue(), ec);
     if (ec.code)
         return nullptr;
 
@@ -401,25 +400,25 @@
         return;
 
     if (!getResult.isDefined()) {
-        m_currentKey = { };
+        m_deprecatedCurrentKey = { };
         m_currentKeyData = { };
-        m_currentPrimaryKey = { };
+        m_deprecatedCurrentPrimaryKey = { };
         m_currentPrimaryKeyData = { };
-        m_currentValue = { };
+        m_deprecatedCurrentValue = { };
 
         m_gotValue = false;
         return;
     }
 
-    m_currentKey = idbKeyDataToScriptValue(*context, getResult.keyData());
+    m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
     m_currentKeyData = getResult.keyData();
-    m_currentPrimaryKey = idbKeyDataToScriptValue(*context, getResult.primaryKeyData());
+    m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
     m_currentPrimaryKeyData = getResult.primaryKeyData();
 
     if (isKeyCursor())
-        m_currentValue = { };
+        m_deprecatedCurrentValue = { };
     else
-        m_currentValue = deserializeIDBValueDataToJSValue(*context, getResult.value().data());
+        m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.value().data());
 
     m_gotValue = true;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h	2016-04-11 23:49:34 UTC (rev 199323)
@@ -31,7 +31,6 @@
 #include "ExceptionCode.h"
 #include "IDBAny.h"
 #include "IDBCursorInfo.h"
-#include <runtime/JSCJSValue.h>
 
 namespace WebCore {
 
@@ -57,9 +56,9 @@
 
     // Implement the IDL
     const String& direction() const;
-    JSC::JSValue key(JSC::ExecState&) const;
-    JSC::JSValue primaryKey(JSC::ExecState&) const;
-    JSC::JSValue value(JSC::ExecState&) const;
+    const Deprecated::ScriptValue& key() const;
+    const Deprecated::ScriptValue& primaryKey() const;
+    const Deprecated::ScriptValue& value() const;
     IDBAny* source();
 
     RefPtr<WebCore::IDBRequest> update(JSC::ExecState&, Deprecated::ScriptValue&, ExceptionCodeWithMessage&);
@@ -112,9 +111,11 @@
     IDBKeyData m_currentKeyData;
     IDBKeyData m_currentPrimaryKeyData;
 
-    JSC::JSValue m_currentKey;
-    JSC::JSValue m_currentPrimaryKey;
-    JSC::JSValue m_currentValue;
+    // FIXME: When ditching Legacy IDB and combining this implementation with the abstract IDBCursor,
+    // these Deprecated::ScriptValue members should be JSValues instead.
+    Deprecated::ScriptValue m_deprecatedCurrentKey;
+    Deprecated::ScriptValue m_deprecatedCurrentPrimaryKey;
+    Deprecated::ScriptValue m_deprecatedCurrentValue;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl	2016-04-11 23:49:34 UTC (rev 199323)
@@ -32,8 +32,8 @@
 ] interface IDBCursor {
     readonly attribute IDBAny source;
     readonly attribute DOMString direction;
-    [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any key;
-    [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any primaryKey;
+    readonly attribute any key;
+    readonly attribute any primaryKey;
 
     [CallWith=ScriptState, RaisesExceptionWithMessage] IDBRequest update(any value);
     [RaisesExceptionWithMessage] void advance([EnforceRange] unsigned long count);

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl	2016-04-11 23:49:34 UTC (rev 199323)
@@ -30,5 +30,5 @@
     SkipVTableValidation,
     JSCustomMarkFunction,
 ] interface IDBCursorWithValue : IDBCursor {
-    [CallWith=ScriptState, ImplementationReturnType=JSValue] readonly attribute any value;
+    readonly attribute any value;
 };

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -149,8 +149,9 @@
 
 short IDBFactory::cmp(ScriptExecutionContext& context, const Deprecated::ScriptValue& firstValue, const Deprecated::ScriptValue& secondValue, ExceptionCodeWithMessage& ec)
 {
-    RefPtr<IDBKey> first = scriptValueToIDBKey(context, firstValue);
-    RefPtr<IDBKey> second = scriptValueToIDBKey(context, secondValue);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> first = scriptValueToIDBKey(&requestState, firstValue);
+    RefPtr<IDBKey> second = scriptValueToIDBKey(&requestState, secondValue);
 
     ASSERT(first);
     ASSERT(second);

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -160,7 +160,8 @@
 {
     LOG(IndexedDB, "IDBIndex::count");
 
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.");
@@ -241,7 +242,8 @@
 {
     LOG(IndexedDB, "IDBIndex::get");
 
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.");
@@ -285,7 +287,8 @@
 {
     LOG(IndexedDB, "IDBIndex::getKey");
 
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.");

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -30,12 +30,9 @@
 #include "IDBBindingUtilities.h"
 #include "IDBDatabaseException.h"
 #include "IDBKey.h"
-#include "IDBKeyData.h"
 
 #if ENABLE(INDEXED_DATABASE)
 
-using namespace JSC;
-
 namespace WebCore {
 
 Ref<IDBKeyRange> IDBKeyRange::create(RefPtr<IDBKey>&& key)
@@ -52,14 +49,16 @@
 {
 }
 
-JSValue IDBKeyRange::lowerValue(ScriptExecutionContext& context) const
+Deprecated::ScriptValue IDBKeyRange::lowerValue(ScriptExecutionContext& context) const
 {
-    return idbKeyDataToScriptValue(context, IDBKeyData(m_lower.get()));
+    DOMRequestState requestState(&context);
+    return idbKeyToScriptValue(&requestState, m_lower);
 }
 
-JSValue IDBKeyRange::upperValue(ScriptExecutionContext& context) const
+Deprecated::ScriptValue IDBKeyRange::upperValue(ScriptExecutionContext& context) const
 {
-    return idbKeyDataToScriptValue(context, IDBKeyData(m_upper.get()));
+    DOMRequestState requestState(&context);
+    return idbKeyToScriptValue(&requestState, m_upper);
 }
 
 RefPtr<IDBKeyRange> IDBKeyRange::only(RefPtr<IDBKey>&& key, ExceptionCode& ec)
@@ -74,7 +73,8 @@
 
 RefPtr<IDBKeyRange> IDBKeyRange::only(ScriptExecutionContext& context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
 {
-    RefPtr<IDBKey> key = scriptValueToIDBKey(context, keyValue);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
     if (!key || !key->isValid()) {
         ec = IDBDatabaseException::DataError;
         return nullptr;
@@ -85,7 +85,8 @@
 
 RefPtr<IDBKeyRange> IDBKeyRange::lowerBound(ScriptExecutionContext& context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
 {
-    RefPtr<IDBKey> bound = scriptValueToIDBKey(context, boundValue);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
     if (!bound || !bound->isValid()) {
         ec = IDBDatabaseException::DataError;
         return nullptr;
@@ -96,7 +97,8 @@
 
 RefPtr<IDBKeyRange> IDBKeyRange::upperBound(ScriptExecutionContext& context, const Deprecated::ScriptValue& boundValue, bool open, ExceptionCode& ec)
 {
-    RefPtr<IDBKey> bound = scriptValueToIDBKey(context, boundValue);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> bound = scriptValueToIDBKey(&requestState, boundValue);
     if (!bound || !bound->isValid()) {
         ec = IDBDatabaseException::DataError;
         return nullptr;
@@ -107,8 +109,9 @@
 
 RefPtr<IDBKeyRange> IDBKeyRange::bound(ScriptExecutionContext& context, const Deprecated::ScriptValue& lowerValue, const Deprecated::ScriptValue& upperValue, bool lowerOpen, bool upperOpen, ExceptionCode& ec)
 {
-    RefPtr<IDBKey> lower = scriptValueToIDBKey(context, lowerValue);
-    RefPtr<IDBKey> upper = scriptValueToIDBKey(context, upperValue);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> lower = scriptValueToIDBKey(&requestState, lowerValue);
+    RefPtr<IDBKey> upper = scriptValueToIDBKey(&requestState, upperValue);
 
     if (!lower || !lower->isValid() || !upper || !upper->isValid()) {
         ec = IDBDatabaseException::DataError;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.h	2016-04-11 23:49:34 UTC (rev 199323)
@@ -58,8 +58,8 @@
     IDBKey* lower() const { return m_lower.get(); }
     IDBKey* upper() const { return m_upper.get(); }
 
-    JSC::JSValue  lowerValue(ScriptExecutionContext&) const;
-    JSC::JSValue upperValue(ScriptExecutionContext&) const;
+    Deprecated::ScriptValue lowerValue(ScriptExecutionContext&) const;
+    Deprecated::ScriptValue upperValue(ScriptExecutionContext&) const;
     bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
     bool upperOpen() const { return m_upperType == UpperBoundOpen; }
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl	2016-04-11 23:49:34 UTC (rev 199323)
@@ -28,8 +28,8 @@
     ImplementationLacksVTable,
     EnabledAtRuntime=IndexedDB,
 ] interface IDBKeyRange {
-    [ImplementedAs=lowerValue, CallWith=ScriptExecutionContext, ImplementationReturnType=JSValue] readonly attribute any lower;
-    [ImplementedAs=upperValue, CallWith=ScriptExecutionContext, ImplementationReturnType=JSValue] readonly attribute any upper;
+    [ImplementedAs=lowerValue,CallWith=ScriptExecutionContext] readonly attribute any lower;
+    [ImplementedAs=upperValue,CallWith=ScriptExecutionContext] readonly attribute any upper;
     readonly attribute boolean lowerOpen;
     readonly attribute boolean upperOpen;
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -182,7 +182,8 @@
         return nullptr;
     }
 
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.");
@@ -398,7 +399,8 @@
 
 RefPtr<IDBRequest> IDBObjectStore::modernDelete(ScriptExecutionContext& context, JSC::JSValue key, ExceptionCodeWithMessage& ec)
 {
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.");
@@ -592,7 +594,8 @@
 {
     LOG(IndexedDB, "IDBObjectStore::count");
 
-    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(context, key);
+    DOMRequestState requestState(&context);
+    RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key);
     if (!idbKey || idbKey->type() == KeyType::Invalid) {
         ec.code = IDBDatabaseException::DataError;
         ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.");

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -326,13 +326,13 @@
 
 void IDBRequest::setResult(const IDBKeyData* keyData)
 {
-    auto* context = scriptExecutionContext();
-    if (!context || !keyData) {
+    if (!keyData) {
         m_result = nullptr;
         return;
     }
 
-    m_result = IDBAny::create(idbKeyDataToScriptValue(*context, *keyData));
+    Deprecated::ScriptValue value = idbKeyDataToScriptValue(scriptExecutionContext(), *keyData);
+    m_result = IDBAny::create(WTFMove(value));
 }
 
 void IDBRequest::setResult(uint64_t number)
@@ -349,7 +349,7 @@
     if (!context)
         return;
 
-    auto value = deserializeIDBValueDataToJSValue(*context, valueData);
+    Deprecated::ScriptValue value = deserializeIDBValueData(*context, valueData);
     m_result = IDBAny::create(WTFMove(value));
 }
 

Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (199322 => 199323)


--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -301,7 +301,7 @@
 {
     JSLockHolder locker(UniqueIDBDatabase::databaseThreadVM());
 
-    auto jsValue = deserializeIDBValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), value);
+    auto jsValue = idbValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), value);
     if (jsValue.isUndefinedOrNull())
         return { };
 
@@ -339,7 +339,7 @@
     JSLockHolder locker(UniqueIDBDatabase::databaseThreadVM());
 
     for (auto iterator : *m_keyValueStore) {
-        auto jsValue = deserializeIDBValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), iterator.value);
+        auto jsValue = idbValueDataToJSValue(UniqueIDBDatabase::databaseThreadExecState(), iterator.value);
         if (jsValue.isUndefinedOrNull())
             return { };
 

Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (199322 => 199323)


--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -37,11 +37,9 @@
 #include "IndexKey.h"
 #include "JSDOMBinding.h"
 #include "Logging.h"
-#include "ScriptState.h"
 #include "SharedBuffer.h"
 #include "ThreadSafeDataBuffer.h"
 
-#include <bindings/ScriptValue.h>
 #include <runtime/DateInstance.h>
 #include <runtime/ObjectConstructor.h>
 
@@ -79,6 +77,43 @@
     return true;
 }
 
+JSValue idbKeyDataToJSValue(JSC::ExecState& exec, const IDBKeyData& keyData)
+{
+    if (keyData.isNull())
+        return jsUndefined();
+
+    Locker<JSLock> locker(exec.vm().apiLock());
+
+    switch (keyData.type()) {
+    case KeyType::Array:
+        {
+            const Vector<IDBKeyData>& inArray = keyData.array();
+            size_t size = inArray.size();
+            JSArray* outArray = constructEmptyArray(&exec, 0, exec.lexicalGlobalObject(), size);
+            for (size_t i = 0; i < size; ++i) {
+                auto& arrayKey = inArray.at(i);
+                outArray->putDirectIndex(&exec, i, idbKeyDataToJSValue(exec, arrayKey));
+            }
+            return JSValue(outArray);
+        }
+    case KeyType::String:
+        return jsStringWithCache(&exec, keyData.string());
+    case KeyType::Date:
+        return jsDateOrNull(&exec, keyData.date());
+    case KeyType::Number:
+        return jsNumber(keyData.number());
+    case KeyType::Min:
+    case KeyType::Max:
+    case KeyType::Invalid:
+        ASSERT_NOT_REACHED();
+        return jsUndefined();
+    }
+
+    ASSERT_NOT_REACHED();
+    return jsUndefined();
+
+}
+
 static JSValue idbKeyToJSValue(ExecState* exec, JSGlobalObject* globalObject, IDBKey* key)
 {
     if (!key || !exec) {
@@ -166,13 +201,13 @@
     return IDBKey::createInvalid();
 }
 
-IDBKeyPath idbKeyPathFromValue(ExecState& exec, JSValue keyPathValue)
+IDBKeyPath idbKeyPathFromValue(ExecState* exec, JSValue keyPathValue)
 {
     IDBKeyPath keyPath;
     if (isJSArray(keyPathValue))
-        keyPath = IDBKeyPath(toNativeArray<String>(&exec, keyPathValue));
+        keyPath = IDBKeyPath(toNativeArray<String>(exec, keyPathValue));
     else
-        keyPath = IDBKeyPath(keyPathValue.toString(&exec)->value(&exec));
+        keyPath = IDBKeyPath(keyPathValue.toString(exec)->value(exec));
     return keyPath;
 }
 
@@ -238,6 +273,32 @@
     return true;
 }
 
+bool injectIDBKeyIntoScriptValue(DOMRequestState* requestState, PassRefPtr<IDBKey> key, Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
+{
+    LOG(StorageAPI, "injectIDBKeyIntoScriptValue");
+
+    ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
+
+    Vector<String> keyPathElements;
+    IDBKeyPathParseError error;
+    IDBParseKeyPath(keyPath.string(), keyPathElements, error);
+    ASSERT(error == IDBKeyPathParseError::None);
+
+    if (keyPathElements.isEmpty())
+        return false;
+
+    ExecState* exec = requestState->exec();
+
+    JSValue parent = ensureNthValueOnKeyPath(exec, value.jsValue(), keyPathElements, keyPathElements.size() - 1);
+    if (parent.isUndefined())
+        return false;
+
+    if (!set(exec, parent, keyPathElements.last(), idbKeyToJSValue(exec, exec->lexicalGlobalObject(), key.get())))
+        return false;
+
+    return true;
+}
+
 bool injectIDBKeyIntoScriptValue(JSC::ExecState& exec, const IDBKeyData& keyData, JSC::JSValue value, const IDBKeyPath& keyPath)
 {
     LOG(IndexedDB, "injectIDBKeyIntoScriptValue");
@@ -266,6 +327,47 @@
     return true;
 }
 
+RefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(ExecState* exec, const Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
+{
+    LOG(StorageAPI, "createIDBKeyFromScriptValueAndKeyPath");
+    ASSERT(!keyPath.isNull());
+
+    if (keyPath.type() == IndexedDB::KeyPathType::Array) {
+        Vector<RefPtr<IDBKey>> result;
+        const Vector<String>& array = keyPath.array();
+        for (size_t i = 0; i < array.size(); i++) {
+            RefPtr<IDBKey> key = internalCreateIDBKeyFromScriptValueAndKeyPath(exec, value, array[i]);
+            if (!key)
+                return nullptr;
+            result.append(key);
+        }
+        return IDBKey::createArray(result);
+    }
+
+    ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
+    return internalCreateIDBKeyFromScriptValueAndKeyPath(exec, value, keyPath.string());
+}
+
+RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState& exec, const Deprecated::ScriptValue& value, const IDBKeyPath& keyPath)
+{
+    ASSERT(!keyPath.isNull());
+
+    if (keyPath.type() == IndexedDB::KeyPathType::Array) {
+        Vector<RefPtr<IDBKey>> result;
+        const Vector<String>& array = keyPath.array();
+        for (size_t i = 0; i < array.size(); i++) {
+            RefPtr<IDBKey> key = internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, array[i]);
+            if (!key)
+                return nullptr;
+            result.append(key);
+        }
+        return IDBKey::createArray(result);
+    }
+
+    ASSERT(keyPath.type() == IndexedDB::KeyPathType::String);
+    return internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, keyPath.string());
+}
+
 RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(ExecState& exec, const JSC::JSValue& value, const IDBKeyPath& keyPath)
 {
     ASSERT(!keyPath.isNull());
@@ -287,6 +389,17 @@
     return internalCreateIDBKeyFromScriptValueAndKeyPath(&exec, value, keyPath.string());
 }
 
+bool canInjectIDBKeyIntoScriptValue(DOMRequestState* requestState, const JSC::JSValue& scriptValue, const IDBKeyPath& keyPath)
+{
+    LOG(StorageAPI, "canInjectIDBKeyIntoScriptValue");
+
+    JSC::ExecState* exec = requestState->exec();
+    if (!exec)
+        return false;
+
+    return canInjectIDBKeyIntoScriptValue(*exec, scriptValue, keyPath);
+}
+
 bool canInjectIDBKeyIntoScriptValue(JSC::ExecState& execState, const JSC::JSValue& scriptValue, const IDBKeyPath& keyPath)
 {
     LOG(StorageAPI, "canInjectIDBKeyIntoScriptValue");
@@ -303,16 +416,30 @@
     return canInjectNthValueOnKeyPath(&execState, scriptValue, keyPathElements, keyPathElements.size() - 1);
 }
 
-JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext& context, const ThreadSafeDataBuffer& valueData)
+Deprecated::ScriptValue deserializeIDBValue(DOMRequestState* requestState, PassRefPtr<SerializedScriptValue> prpValue)
 {
-    auto* state = context.execState();
-    if (!state)
-        return jsNull();
+    ExecState* exec = requestState->exec();
+    RefPtr<SerializedScriptValue> serializedValue = prpValue;
+    JSValue result;
+    if (serializedValue)
+        result = serializedValue->deserialize(exec, exec->lexicalGlobalObject(), 0);
+    else
+        result = jsNull();
+    return Deprecated::ScriptValue(exec->vm(), result);
+}
 
-    return deserializeIDBValueDataToJSValue(*state, valueData);
+Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext& context, const ThreadSafeDataBuffer& valueData)
+{
+    DOMRequestState state(&context);
+    auto* execState = state.exec();
+
+    if (!execState)
+        return Deprecated::ScriptValue();
+
+    return Deprecated::ScriptValue(execState->vm(), deserializeIDBValueDataToJSValue(*execState, valueData));
 }
 
-JSValue deserializeIDBValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
+JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
 {
     if (!valueData.data())
         return jsUndefined();
@@ -331,24 +458,74 @@
     return result;
 }
 
-RefPtr<IDBKey> scriptValueToIDBKey(ScriptExecutionContext& context, const JSC::JSValue& scriptValue)
+Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState* requestState, PassRefPtr<SharedBuffer> prpBuffer, bool keyIsDefined)
 {
-    return createIDBKeyFromValue(context.execState(), scriptValue);
+    if (prpBuffer) {
+        Vector<uint8_t> value;
+        value.append(prpBuffer->data(), prpBuffer->size());
+        return deserializeIDBValueBuffer(requestState->exec(), WTFMove(value), keyIsDefined);
+    }
+
+    return Deprecated::ScriptValue(requestState->exec()->vm(), jsNull());
 }
 
-RefPtr<IDBKey> scriptValueToIDBKey(ExecState& state, const JSC::JSValue& scriptValue)
+static JSValue idbValueDataToJSValue(JSC::ExecState& exec, Vector<uint8_t>&& buffer)
 {
-    return createIDBKeyFromValue(&state, scriptValue);
+    if (buffer.isEmpty())
+        return jsNull();
+
+    RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::createFromWireBytes(WTFMove(buffer));
+    return serializedValue->deserialize(&exec, exec.lexicalGlobalObject(), 0, NonThrowing);
 }
 
-JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext& context, const IDBKeyData& keyData)
+Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState* exec, Vector<uint8_t>&& buffer, bool keyIsDefined)
 {
-    auto* exec = context.execState();
-    if (!exec)
+    ASSERT(exec);
+
+    // If the key doesn't exist, then the value must be undefined (as opposed to null).
+    if (!keyIsDefined) {
+        // We either shouldn't have a buffer or it should be of size 0.
+        ASSERT(!buffer.size());
+        return Deprecated::ScriptValue(exec->vm(), jsUndefined());
+    }
+
+    JSValue result = idbValueDataToJSValue(*exec, WTFMove(buffer));
+    return Deprecated::ScriptValue(exec->vm(), result);
+}
+
+JSValue idbValueDataToJSValue(JSC::ExecState& exec, const ThreadSafeDataBuffer& valueData)
+{
+    if (!valueData.data())
         return jsUndefined();
 
+    return idbValueDataToJSValue(exec, Vector<uint8_t>(*valueData.data()));
+}
+
+Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState* requestState, PassRefPtr<IDBKey> key)
+{
+    ExecState* exec = requestState->exec();
+    if (!exec)
+        return { };
+
+    return Deprecated::ScriptValue(exec->vm(), idbKeyToJSValue(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), key.get()));
+}
+
+RefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState* requestState, const JSC::JSValue& scriptValue)
+{
+    ExecState* exec = requestState->exec();
+    return createIDBKeyFromValue(exec, scriptValue);
+}
+
+RefPtr<IDBKey> scriptValueToIDBKey(ExecState& exec, const JSC::JSValue& scriptValue)
+{
+    return createIDBKeyFromValue(&exec, scriptValue);
+}
+
+Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext* context, const IDBKeyData& keyData)
+{
     RefPtr<IDBKey> key = keyData.maybeCreateIDBKey();
-    return Deprecated::ScriptValue(exec->vm(), idbKeyToJSValue(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), key.get())).jsValue();
+    DOMRequestState requestState(context);
+    return idbKeyToScriptValue(&requestState, key.get());
 }
 
 static Vector<IDBKeyData> createKeyPathArray(ExecState& exec, JSValue value, const IDBIndexInfo& info)

Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h (199322 => 199323)


--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h	2016-04-11 23:49:34 UTC (rev 199323)
@@ -29,32 +29,49 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "Dictionary.h"
+#include <bindings/ScriptValue.h>
 #include <wtf/Forward.h>
 
 namespace WebCore {
 
+class DOMRequestState;
 class IDBIndexInfo;
 class IDBKey;
 class IDBKeyData;
 class IDBKeyPath;
 class IndexKey;
+class SharedBuffer;
 class ThreadSafeDataBuffer;
 
-IDBKeyPath idbKeyPathFromValue(JSC::ExecState&, JSC::JSValue);
+IDBKeyPath idbKeyPathFromValue(JSC::ExecState*, JSC::JSValue);
 
+bool injectIDBKeyIntoScriptValue(DOMRequestState*, PassRefPtr<IDBKey>, Deprecated::ScriptValue&, const IDBKeyPath&);
+bool injectIDBKeyIntoScriptValue(JSC::ExecState&, const IDBKeyData&, JSC::JSValue, const IDBKeyPath&);
+
+RefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(JSC::ExecState*, const Deprecated::ScriptValue&, const IDBKeyPath&);
+RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&, const Deprecated::ScriptValue&, const IDBKeyPath&);
 RefPtr<IDBKey> maybeCreateIDBKeyFromScriptValueAndKeyPath(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&);
+
+bool canInjectIDBKeyIntoScriptValue(DOMRequestState*, const JSC::JSValue&, const IDBKeyPath&);
 bool canInjectIDBKeyIntoScriptValue(JSC::ExecState&, const JSC::JSValue&, const IDBKeyPath&);
-bool injectIDBKeyIntoScriptValue(JSC::ExecState&, const IDBKeyData&, JSC::JSValue, const IDBKeyPath&);
 
-JSC::JSValue idbKeyDataToScriptValue(ScriptExecutionContext&, const IDBKeyData&);
-void generateIndexKeyForValue(JSC::ExecState&, const IDBIndexInfo&, JSC::JSValue, IndexKey& outKey);
+Deprecated::ScriptValue deserializeIDBValue(DOMRequestState*, PassRefPtr<SerializedScriptValue>);
+Deprecated::ScriptValue deserializeIDBValueData(ScriptExecutionContext&, const ThreadSafeDataBuffer& valueData);
+Deprecated::ScriptValue deserializeIDBValueBuffer(DOMRequestState*, PassRefPtr<SharedBuffer>, bool keyIsDefined);
+WEBCORE_EXPORT Deprecated::ScriptValue deserializeIDBValueBuffer(JSC::ExecState*, Vector<uint8_t>&&, bool keyIsDefined);
 
-JSC::JSValue deserializeIDBValueDataToJSValue(ScriptExecutionContext&, const ThreadSafeDataBuffer& valueData);
 JSC::JSValue deserializeIDBValueDataToJSValue(JSC::ExecState&, const ThreadSafeDataBuffer& valueData);
 
-RefPtr<IDBKey> scriptValueToIDBKey(ScriptExecutionContext&, const JSC::JSValue&);
+Deprecated::ScriptValue idbKeyToScriptValue(DOMRequestState*, PassRefPtr<IDBKey>);
+RefPtr<IDBKey> scriptValueToIDBKey(DOMRequestState*, const JSC::JSValue&);
 RefPtr<IDBKey> scriptValueToIDBKey(JSC::ExecState&, const JSC::JSValue&);
 
+Deprecated::ScriptValue idbKeyDataToScriptValue(ScriptExecutionContext*, const IDBKeyData&);
+
+JSC::JSValue idbValueDataToJSValue(JSC::ExecState&, const ThreadSafeDataBuffer& valueData);
+void generateIndexKeyForValue(JSC::ExecState&, const IDBIndexInfo&, JSC::JSValue, IndexKey& outKey);
+JSC::JSValue idbKeyDataToJSValue(JSC::ExecState&, const IDBKeyData&);
+
 }
 
 #endif // ENABLE(INDEXED_DATABASE)

Modified: trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp (199322 => 199323)


--- trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -98,7 +98,7 @@
     case IDBAny::Type::IDBTransaction:
         return toJS(exec, globalObject, idbAny->idbTransaction());
     case IDBAny::Type::ScriptValue:
-        return idbAny->scriptValue();
+        return idbAny->scriptValue().jsValue();
     case IDBAny::Type::String:
         return jsStringWithCache(exec, idbAny->string());
     case IDBAny::Type::Integer:

Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (199322 => 199323)


--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -66,7 +66,7 @@
             return jsUndefined();
 
         if (!keyPathValue.isUndefinedOrNull()) {
-            keyPath = idbKeyPathFromValue(state, keyPathValue);
+            keyPath = idbKeyPathFromValue(&state, keyPathValue);
             if (state.hadException())
                 return jsUndefined();
         }

Modified: trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp (199322 => 199323)


--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -119,7 +119,7 @@
     IDBKeyPath keyPath;
     JSValue keyPathValue = state.argument(1);
     if (!keyPathValue.isUndefinedOrNull())
-        keyPath = idbKeyPathFromValue(state, keyPathValue);
+        keyPath = idbKeyPathFromValue(&state, keyPathValue);
     else {
         ExceptionCodeWithMessage ec;
         ec.code = IDBDatabaseException::SyntaxError;

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (199322 => 199323)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-11 23:49:34 UTC (rev 199323)
@@ -4349,12 +4349,9 @@
         return "jsArray(state, $thisValue->globalObject(), $value)";
     }
 
-    my $returnType = $signature->extendedAttributes->{"ImplementationReturnType"};
     if ($type eq "any") {
         if ($interfaceName eq "Document") {
             AddToImplIncludes("JSCanvasRenderingContext2D.h", $conditional);
-        } elsif (defined $returnType and $returnType eq "JSValue") {
-            return "$value";
         } else {
             return "($value.hasNoValue() ? jsNull() : $value.jsValue())";
         }

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (199322 => 199323)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-04-11 23:49:34 UTC (rev 199323)
@@ -67,10 +67,9 @@
 GetterRaisesExceptionWithMessage
 GlobalContext=DOMWindow|WorkerGlobalScope|DedicatedWorkerGlobalScope
 Immutable
-ImplementedAs=*
 ImplementationLacksVTable
 ImplementationNamespace=*
-ImplementationReturnType=*
+ImplementedAs=*
 ImplicitThis
 InitializedByEventConstructor
 InterfaceName=*

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (199322 => 199323)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -487,15 +487,4 @@
     return false;
 }
 
-JSC::ExecState* ScriptExecutionContext::execState()
-{
-    if (is<Document>(*this)) {
-        Document& document = downcast<Document>(*this);
-        return execStateFromPage(mainThreadNormalWorld(), document.page());
-    }
-
-    WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(this);
-    return execStateFromWorkerGlobalScope(workerGlobalScope);
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (199322 => 199323)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.h	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h	2016-04-11 23:49:34 UTC (rev 199323)
@@ -188,8 +188,6 @@
     int timerNestingLevel() const { return m_timerNestingLevel; }
     void setTimerNestingLevel(int timerNestingLevel) { m_timerNestingLevel = timerNestingLevel; }
 
-    JSC::ExecState* execState();
-
 protected:
     class AddConsoleMessageTask : public Task {
     public:

Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (199322 => 199323)


--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2016-04-11 23:47:13 UTC (rev 199322)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2016-04-11 23:49:34 UTC (rev 199323)
@@ -44,7 +44,6 @@
 #include "EventTarget.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
-#include "IDBBindingUtilities.h"
 #include "IDBCursor.h"
 #include "IDBCursorWithValue.h"
 #include "IDBDatabase.h"
@@ -334,7 +333,7 @@
         return this == &other;
     }
 
-    void handleEvent(ScriptExecutionContext* context, Event* event) override
+    void handleEvent(ScriptExecutionContext*, Event* event) override
     {
         if (event->type() != eventNames().successEvent) {
             m_requestCallback->sendFailure("Unexpected event type.");
@@ -381,14 +380,10 @@
             return;
         }
 
-        JSC::ExecState* state = context ? context->execState() : nullptr;
-        if (!state)
-            return;
-
         RefPtr<DataEntry> dataEntry = DataEntry::create()
-            .setKey(m_injectedScript.wrapObject({ state->vm(), idbCursor->key(*state) }, String(), true))
-            .setPrimaryKey(m_injectedScript.wrapObject({ state->vm(), idbCursor->primaryKey(*state) }, String(), true))
-            .setValue(m_injectedScript.wrapObject({ state->vm(), idbCursor->value(*state) }, String(), true))
+            .setKey(m_injectedScript.wrapObject(idbCursor->key(), String(), true))
+            .setPrimaryKey(m_injectedScript.wrapObject(idbCursor->primaryKey(), String(), true))
+            .setValue(m_injectedScript.wrapObject(idbCursor->value(), String(), true))
             .release();
         m_result->addItem(WTFMove(dataEntry));
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to