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