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

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

Issue 1862033002: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need to register, taking the same approach as extractTransferables Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/methods.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp
index e90068358c42dcf50fb886f1a842d7dd89990662..a1b462ff7ecdf9db61625207391f08cbc7d35170 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp
@@ -464,20 +464,20 @@ void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance, const v
exceptionState.throwIfNeeded();
return;
}
- Transferables transferables;
+ Transferables* transferables = SerializedScriptValueFactory::instance().createTransferables();
if (info.Length() > 1) {
const int transferablesArgIndex = 1;
- if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) {
+ if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, *transferables, exceptionState)) {
exceptionState.throwIfNeeded();
return;
}
}
- RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instance().create(info.GetIsolate(), info[0], &transferables, exceptionState);
+ RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instance().create(info.GetIsolate(), info[0], transferables, exceptionState);
if (exceptionState.throwIfNeeded())
return;
// FIXME: Only pass context/exceptionState if instance really requires it.
ExecutionContext* context = currentExecutionContext(info.GetIsolate());
- instance->postMessage(context, message.release(), transferables.messagePorts, exceptionState);
+ instance->postMessage(context, message.release(), transferables->messagePorts, exceptionState);
exceptionState.throwIfNeeded();
}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698