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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 2734173002: postMessage(): transfer allocation costs along with value. (Closed)
Patch Set: rebased upto r455878 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/core/v8/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index c9bcc0472ff271edc9bce2bebaa0473765ea6e40..ed8330b9afa2e06f0994c9db8bec9ea4161ab45c 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -284,8 +284,9 @@ void V8Window::postMessageMethodCustom(
if (exceptionState.hadException())
return;
- window->postMessage(message.release(), transferables.messagePorts,
- targetOrigin, source, exceptionState);
+ window->postMessage(message.get(), transferables.messagePorts, targetOrigin,
+ source, exceptionState);
+ message->unregisterMemoryAllocatedByCurrentScriptContext();
}
void V8Window::openMethodCustom(

Powered by Google App Engine
This is Rietveld 408576698