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; | |
385 RefPtr<SerializedScriptValue> serialized_value = | 384 RefPtr<SerializedScriptValue> serialized_value = |
386 SerializedScriptValue::Serialize(isolate, value.V8Value(), options, | 385 SerializedScriptValue::Serialize(isolate, value.V8Value(), options, |
387 exception_state); | 386 exception_state); |
388 if (exception_state.HadException()) | 387 if (exception_state.HadException()) |
389 return nullptr; | 388 return nullptr; |
390 | 389 |
391 // Keys that need to be extracted must be taken from a clone so that | 390 // Keys that need to be extracted must be taken from a clone so that |
392 // side effects (i.e. getters) are not triggered. Construct the | 391 // side effects (i.e. getters) are not triggered. Construct the |
393 // clone lazily since the operation may be expensive. | 392 // clone lazily since the operation may be expensive. |
394 ScriptValue clone; | 393 ScriptValue clone; |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 } | 1052 } |
1054 } | 1053 } |
1055 return IDBIndexMetadata::kInvalidId; | 1054 return IDBIndexMetadata::kInvalidId; |
1056 } | 1055 } |
1057 | 1056 |
1058 WebIDBDatabase* IDBObjectStore::BackendDB() const { | 1057 WebIDBDatabase* IDBObjectStore::BackendDB() const { |
1059 return transaction_->BackendDB(); | 1058 return transaction_->BackendDB(); |
1060 } | 1059 } |
1061 | 1060 |
1062 } // namespace blink | 1061 } // namespace blink |
OLD | NEW |