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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2755383004: Encapsulate optional SerializedScriptValue serialize/deserialize parameters. (Closed)
Patch Set: fuzzer Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 28fc761b81b70bb67faf1d88e8094b864a768dbd..88c099f63f39b47f318a4bdd583965cf3b558540 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -433,7 +433,9 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance,
RefPtr<SerializedScriptValue> message;
if (instance->canTransferArrayBuffersAndImageBitmaps()) {
// This instance supports sending array buffers by move semantics.
- message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], &transferables, nullptr, exceptionState);
+ SerializedScriptValue::SerializeOptions options;
+ options.transferables = &transferables;
+ message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], options, exceptionState);
if (exceptionState.hadException())
return;
} else {
@@ -449,7 +451,9 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance,
transferables.arrayBuffers.clear();
ImageBitmapArray transferableImageBitmaps = transferables.imageBitmaps;
transferables.imageBitmaps.clear();
- message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], &transferables, nullptr, exceptionState);
+ SerializedScriptValue::SerializeOptions options;
+ options.transferables = &transferables;
+ message = SerializedScriptValue::serialize(info.GetIsolate(), info[0], options, exceptionState);
if (exceptionState.hadException())
return;

Powered by Google App Engine
This is Rietveld 408576698