| Index: Source/modules/indexeddb/IDBObjectStore.cpp
|
| diff --git a/Source/modules/indexeddb/IDBObjectStore.cpp b/Source/modules/indexeddb/IDBObjectStore.cpp
|
| index 2c92b0ce937f238e3d2dcf73ea543e769d790d15..cc67403a532ecb6fb44f30806d7b2447e27b3b8e 100644
|
| --- a/Source/modules/indexeddb/IDBObjectStore.cpp
|
| +++ b/Source/modules/indexeddb/IDBObjectStore.cpp
|
| @@ -125,29 +125,17 @@ PassRefPtr<IDBRequest> IDBObjectStore::add(ScriptState* state, ScriptValue& valu
|
| return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, key, ec);
|
| }
|
|
|
| -PassRefPtr<IDBRequest> IDBObjectStore::add(ScriptState* state, ScriptValue& value, ExceptionCode& ec)
|
| -{
|
| - IDB_TRACE("IDBObjectStore::add");
|
| - return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
|
| -}
|
| -
|
| PassRefPtr<IDBRequest> IDBObjectStore::put(ScriptState* state, ScriptValue& value, const ScriptValue& key, ExceptionCode& ec)
|
| {
|
| IDB_TRACE("IDBObjectStore::put");
|
| return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, key, ec);
|
| }
|
|
|
| -PassRefPtr<IDBRequest> IDBObjectStore::put(ScriptState* state, ScriptValue& value, ExceptionCode& ec)
|
| -{
|
| - IDB_TRACE("IDBObjectStore::put");
|
| - return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
|
| -}
|
| -
|
| PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBAny> source, ScriptState* state, ScriptValue& value, const ScriptValue& keyValue, ExceptionCode& ec)
|
| {
|
| ScriptExecutionContext* context = scriptExecutionContextFromScriptState(state);
|
| DOMRequestState requestState(context);
|
| - RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue);
|
| + RefPtr<IDBKey> key = keyValue.isUndefined() ? 0 : scriptValueToIDBKey(&requestState, keyValue);
|
| return put(putMode, source, state, value, key.release(), ec);
|
| }
|
|
|
|
|