Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp

Issue 2848933002: Reland of SharedArrayBuffer throws serializing to indexeddb (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698