| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 399 } |
| 400 if (m_transaction->isReadOnly()) { | 400 if (m_transaction->isReadOnly()) { |
| 401 exceptionState.throwDOMException( | 401 exceptionState.throwDOMException( |
| 402 ReadOnlyError, IDBDatabase::transactionReadOnlyErrorMessage); | 402 ReadOnlyError, IDBDatabase::transactionReadOnlyErrorMessage); |
| 403 return nullptr; | 403 return nullptr; |
| 404 } | 404 } |
| 405 | 405 |
| 406 v8::Isolate* isolate = scriptState->isolate(); | 406 v8::Isolate* isolate = scriptState->isolate(); |
| 407 DCHECK(isolate->InContext()); | 407 DCHECK(isolate->InContext()); |
| 408 Vector<WebBlobInfo> blobInfo; | 408 Vector<WebBlobInfo> blobInfo; |
| 409 SerializedScriptValue::SerializeOptions options; |
| 410 options.blobInfo = &blobInfo; |
| 409 RefPtr<SerializedScriptValue> serializedValue = | 411 RefPtr<SerializedScriptValue> serializedValue = |
| 410 SerializedScriptValue::serialize(isolate, value.v8Value(), nullptr, | 412 SerializedScriptValue::serialize(isolate, value.v8Value(), options, |
| 411 &blobInfo, exceptionState); | 413 exceptionState); |
| 412 if (exceptionState.hadException()) | 414 if (exceptionState.hadException()) |
| 413 return nullptr; | 415 return nullptr; |
| 414 | 416 |
| 415 // Keys that need to be extracted must be taken from a clone so that | 417 // Keys that need to be extracted must be taken from a clone so that |
| 416 // side effects (i.e. getters) are not triggered. Construct the | 418 // side effects (i.e. getters) are not triggered. Construct the |
| 417 // clone lazily since the operation may be expensive. | 419 // clone lazily since the operation may be expensive. |
| 418 ScriptValue clone; | 420 ScriptValue clone; |
| 419 | 421 |
| 420 const IDBKeyPath& keyPath = idbKeyPath(); | 422 const IDBKeyPath& keyPath = idbKeyPath(); |
| 421 const bool usesInLineKeys = !keyPath.isNull(); | 423 const bool usesInLineKeys = !keyPath.isNull(); |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1110 } |
| 1109 } | 1111 } |
| 1110 return IDBIndexMetadata::InvalidId; | 1112 return IDBIndexMetadata::InvalidId; |
| 1111 } | 1113 } |
| 1112 | 1114 |
| 1113 WebIDBDatabase* IDBObjectStore::backendDB() const { | 1115 WebIDBDatabase* IDBObjectStore::backendDB() const { |
| 1114 return m_transaction->backendDB(); | 1116 return m_transaction->backendDB(); |
| 1115 } | 1117 } |
| 1116 | 1118 |
| 1117 } // namespace blink | 1119 } // namespace blink |
| OLD | NEW |