| Index: Source/modules/indexeddb/IDBObjectStore.cpp
|
| diff --git a/Source/modules/indexeddb/IDBObjectStore.cpp b/Source/modules/indexeddb/IDBObjectStore.cpp
|
| index fb4b868552042d43f96a8b856443fc32d8d87a47..509f253748c7cd3aebee92139a9fe627c43ce26a 100644
|
| --- a/Source/modules/indexeddb/IDBObjectStore.cpp
|
| +++ b/Source/modules/indexeddb/IDBObjectStore.cpp
|
| @@ -121,7 +121,8 @@ IDBRequest* IDBObjectStore::get(ScriptState* scriptState, const ScriptValue& key
|
| static void generateIndexKeysForValue(v8::Isolate* isolate, const IDBIndexMetadata& indexMetadata, const ScriptValue& objectValue, IDBObjectStore::IndexKeys* indexKeys)
|
| {
|
| ASSERT(indexKeys);
|
| - IDBKey* indexKey = createIDBKeyFromScriptValueAndKeyPath(isolate, objectValue, indexMetadata.keyPath);
|
| + NonThrowableExceptionState exceptionState;
|
| + IDBKey* indexKey = ScriptValue::to<IDBKey*>(isolate, objectValue, exceptionState, indexMetadata.keyPath);
|
|
|
| if (!indexKey)
|
| return;
|
| @@ -155,7 +156,7 @@ IDBRequest* IDBObjectStore::put(ScriptState* scriptState, const ScriptValue& val
|
|
|
| IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode, IDBAny* source, const ScriptValue& value, const ScriptValue& keyValue, ExceptionState& exceptionState)
|
| {
|
| - IDBKey* key = keyValue.isUndefined() ? nullptr : keyValue.to<IDBKey*>(exceptionState);
|
| + IDBKey* key = keyValue.isUndefined() ? nullptr : ScriptValue::to<IDBKey*>(scriptState->isolate(), keyValue, exceptionState);
|
| return put(scriptState, putMode, source, value, key, exceptionState);
|
| }
|
|
|
| @@ -202,7 +203,7 @@ IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
|
| ASSERT(key);
|
| if (clone.isEmpty())
|
| clone = deserializeScriptValue(scriptState, serializedValue.get(), &blobInfo);
|
| - IDBKey* keyPathKey = createIDBKeyFromScriptValueAndKeyPath(scriptState->isolate(), clone, keyPath);
|
| + IDBKey* keyPathKey = ScriptValue::to<IDBKey*>(scriptState->isolate(), clone, exceptionState, keyPath);
|
| if (!keyPathKey || !keyPathKey->isEqual(key)) {
|
| exceptionState.throwDOMException(DataError, "The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.");
|
| return nullptr;
|
| @@ -216,7 +217,7 @@ IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
|
| if (usesInLineKeys) {
|
| if (clone.isEmpty())
|
| clone = deserializeScriptValue(scriptState, serializedValue.get(), &blobInfo);
|
| - IDBKey* keyPathKey = createIDBKeyFromScriptValueAndKeyPath(scriptState->isolate(), clone, keyPath);
|
| + IDBKey* keyPathKey = ScriptValue::to<IDBKey*>(scriptState->isolate(), clone, exceptionState, keyPath);
|
| if (keyPathKey && !keyPathKey->isValid()) {
|
| exceptionState.throwDOMException(DataError, "Evaluating the object store's key path yielded a value that is not a valid key.");
|
| return 0;
|
|
|