| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, const ScriptValue& val
ue, const ScriptValue& key, ExceptionState& exceptionState) | 150 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, const ScriptValue& val
ue, const ScriptValue& key, ExceptionState& exceptionState) |
| 151 { | 151 { |
| 152 IDB_TRACE("IDBObjectStore::put"); | 152 IDB_TRACE("IDBObjectStore::put"); |
| 153 return put(scriptState, WebIDBPutModeAddOrUpdate, IDBAny::create(this), valu
e, key, exceptionState); | 153 return put(scriptState, WebIDBPutModeAddOrUpdate, IDBAny::create(this), valu
e, key, exceptionState); |
| 154 } | 154 } |
| 155 | 155 |
| 156 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
IDBAny* source, const ScriptValue& value, const ScriptValue& keyValue, Exceptio
nState& exceptionState) | 156 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
IDBAny* source, const ScriptValue& value, const ScriptValue& keyValue, Exceptio
nState& exceptionState) |
| 157 { | 157 { |
| 158 IDBKey* key = keyValue.isUndefined() ? nullptr : scriptValueToIDBKey(scriptS
tate->isolate(), keyValue); | 158 IDBKey* key = keyValue.isUndefined() ? nullptr : keyValue.to<IDBKey*>(except
ionState); |
| 159 return put(scriptState, putMode, source, value, key, exceptionState); | 159 return put(scriptState, putMode, source, value, key, exceptionState); |
| 160 } | 160 } |
| 161 | 161 |
| 162 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
IDBAny* source, const ScriptValue& value, IDBKey* key, ExceptionState& exceptio
nState) | 162 IDBRequest* IDBObjectStore::put(ScriptState* scriptState, WebIDBPutMode putMode,
IDBAny* source, const ScriptValue& value, IDBKey* key, ExceptionState& exceptio
nState) |
| 163 { | 163 { |
| 164 if (isDeleted()) { | 164 if (isDeleted()) { |
| 165 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::objectS
toreDeletedErrorMessage); | 165 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::objectS
toreDeletedErrorMessage); |
| 166 return 0; | 166 return 0; |
| 167 } | 167 } |
| 168 if (m_transaction->isFinished() || m_transaction->isFinishing()) { | 168 if (m_transaction->isFinished() || m_transaction->isFinishing()) { |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 669 } |
| 670 return IDBIndexMetadata::InvalidId; | 670 return IDBIndexMetadata::InvalidId; |
| 671 } | 671 } |
| 672 | 672 |
| 673 WebIDBDatabase* IDBObjectStore::backendDB() const | 673 WebIDBDatabase* IDBObjectStore::backendDB() const |
| 674 { | 674 { |
| 675 return m_transaction->backendDB(); | 675 return m_transaction->backendDB(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 } // namespace blink | 678 } // namespace blink |
| OLD | NEW |