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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 index_ids.push_back(it.key); | 499 index_ids.push_back(it.key); |
500 index_keys.push_back(keys); | 500 index_keys.push_back(keys); |
501 } | 501 } |
502 | 502 |
503 IDBRequest* request = | 503 IDBRequest* request = |
504 IDBRequest::Create(script_state, source, transaction_.Get()); | 504 IDBRequest::Create(script_state, source, transaction_.Get()); |
505 Vector<char> wire_bytes; | 505 Vector<char> wire_bytes; |
506 serialized_value->ToWireBytes(wire_bytes); | 506 serialized_value->ToWireBytes(wire_bytes); |
507 RefPtr<SharedBuffer> value_buffer = SharedBuffer::AdoptVector(wire_bytes); | 507 RefPtr<SharedBuffer> value_buffer = SharedBuffer::AdoptVector(wire_bytes); |
508 | 508 |
| 509 request->StorePutOperationBlobs(serialized_value->BlobDataHandles()); |
| 510 |
509 BackendDB()->Put(transaction_->Id(), Id(), WebData(value_buffer), blob_info, | 511 BackendDB()->Put(transaction_->Id(), Id(), WebData(value_buffer), blob_info, |
510 key, static_cast<WebIDBPutMode>(put_mode), | 512 key, static_cast<WebIDBPutMode>(put_mode), |
511 request->CreateWebCallbacks().release(), index_ids, | 513 request->CreateWebCallbacks().release(), index_ids, |
512 index_keys); | 514 index_keys); |
513 return request; | 515 return request; |
514 } | 516 } |
515 | 517 |
516 IDBRequest* IDBObjectStore::deleteFunction(ScriptState* script_state, | 518 IDBRequest* IDBObjectStore::deleteFunction(ScriptState* script_state, |
517 const ScriptValue& key, | 519 const ScriptValue& key, |
518 ExceptionState& exception_state) { | 520 ExceptionState& exception_state) { |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 } | 1054 } |
1053 } | 1055 } |
1054 return IDBIndexMetadata::kInvalidId; | 1056 return IDBIndexMetadata::kInvalidId; |
1055 } | 1057 } |
1056 | 1058 |
1057 WebIDBDatabase* IDBObjectStore::BackendDB() const { | 1059 WebIDBDatabase* IDBObjectStore::BackendDB() const { |
1058 return transaction_->BackendDB(); | 1060 return transaction_->BackendDB(); |
1059 } | 1061 } |
1060 | 1062 |
1061 } // namespace blink | 1063 } // namespace blink |
OLD | NEW |