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

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

Issue 2741793003: Accurate transfer of SerializedScriptValue allocation costs. (Closed)
Patch Set: 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 33cbc14eebec1efcfb8e2649285cd02dd8cf9d44..d84a95657b73a6fa5d049f482daf2a3921e0d0eb 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -465,8 +465,9 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance,
// FIXME: Only pass scriptState/exceptionState if instance really requires it.
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
+ message->prepareForTransferringContext();
instance->postMessage(scriptState, message.get(), transferables.messagePorts, exceptionState);
- message->unregisterMemoryAllocatedByCurrentScriptContext();
+ message->finalizeTransferringContext();
}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698