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

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

Issue 2749503002: [wasm] enable wasm structured cloning in specific cases (Closed)
Patch Set: async Created 3 years, 8 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/core/testing/Internals.idl ('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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 409 SerializedScriptValue::SerializeOptions options;
410 options.blobInfo = &blobInfo; 410 options.blobInfo = &blobInfo;
411 options.writeWasmToStream =
412 scriptState->getExecutionContext()->isSecureContext();
411 RefPtr<SerializedScriptValue> serializedValue = 413 RefPtr<SerializedScriptValue> serializedValue =
412 SerializedScriptValue::serialize(isolate, value.v8Value(), options, 414 SerializedScriptValue::serialize(isolate, value.v8Value(), options,
413 exceptionState); 415 exceptionState);
414 if (exceptionState.hadException()) 416 if (exceptionState.hadException())
415 return nullptr; 417 return nullptr;
416 418
417 // Keys that need to be extracted must be taken from a clone so that 419 // Keys that need to be extracted must be taken from a clone so that
418 // side effects (i.e. getters) are not triggered. Construct the 420 // side effects (i.e. getters) are not triggered. Construct the
419 // clone lazily since the operation may be expensive. 421 // clone lazily since the operation may be expensive.
420 ScriptValue clone; 422 ScriptValue clone;
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1112 }
1111 } 1113 }
1112 return IDBIndexMetadata::InvalidId; 1114 return IDBIndexMetadata::InvalidId;
1113 } 1115 }
1114 1116
1115 WebIDBDatabase* IDBObjectStore::backendDB() const { 1117 WebIDBDatabase* IDBObjectStore::backendDB() const {
1116 return m_transaction->backendDB(); 1118 return m_transaction->backendDB();
1117 } 1119 }
1118 1120
1119 } // namespace blink 1121 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698