| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 return nullptr; | 374 return nullptr; |
| 375 } | 375 } |
| 376 | 376 |
| 377 v8::Isolate* isolate = script_state->GetIsolate(); | 377 v8::Isolate* isolate = script_state->GetIsolate(); |
| 378 DCHECK(isolate->InContext()); | 378 DCHECK(isolate->InContext()); |
| 379 Vector<WebBlobInfo> blob_info; | 379 Vector<WebBlobInfo> blob_info; |
| 380 SerializedScriptValue::SerializeOptions options; | 380 SerializedScriptValue::SerializeOptions options; |
| 381 options.blob_info = &blob_info; | 381 options.blob_info = &blob_info; |
| 382 options.write_wasm_to_stream = | 382 options.write_wasm_to_stream = |
| 383 ExecutionContext::From(script_state)->IsSecureContext(); | 383 ExecutionContext::From(script_state)->IsSecureContext(); |
| 384 options.for_storage = true; |
| 384 RefPtr<SerializedScriptValue> serialized_value = | 385 RefPtr<SerializedScriptValue> serialized_value = |
| 385 SerializedScriptValue::Serialize(isolate, value.V8Value(), options, | 386 SerializedScriptValue::Serialize(isolate, value.V8Value(), options, |
| 386 exception_state); | 387 exception_state); |
| 387 if (exception_state.HadException()) | 388 if (exception_state.HadException()) |
| 388 return nullptr; | 389 return nullptr; |
| 389 | 390 |
| 390 // Keys that need to be extracted must be taken from a clone so that | 391 // Keys that need to be extracted must be taken from a clone so that |
| 391 // side effects (i.e. getters) are not triggered. Construct the | 392 // side effects (i.e. getters) are not triggered. Construct the |
| 392 // clone lazily since the operation may be expensive. | 393 // clone lazily since the operation may be expensive. |
| 393 ScriptValue clone; | 394 ScriptValue clone; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 } | 1053 } |
| 1053 } | 1054 } |
| 1054 return IDBIndexMetadata::kInvalidId; | 1055 return IDBIndexMetadata::kInvalidId; |
| 1055 } | 1056 } |
| 1056 | 1057 |
| 1057 WebIDBDatabase* IDBObjectStore::BackendDB() const { | 1058 WebIDBDatabase* IDBObjectStore::BackendDB() const { |
| 1058 return transaction_->BackendDB(); | 1059 return transaction_->BackendDB(); |
| 1059 } | 1060 } |
| 1060 | 1061 |
| 1061 } // namespace blink | 1062 } // namespace blink |
| OLD | NEW |