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..a4fd928128f3920291e883eb4fbbffa3a45cdf77 100644 |
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl |
@@ -465,8 +465,8 @@ 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->unregisterMemoryAllocatedWithCurrentScriptContext(); |
instance->postMessage(scriptState, message.get(), transferables.messagePorts, exceptionState); |
- message->unregisterMemoryAllocatedByCurrentScriptContext(); |
} |
{% endmacro %} |