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

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

Issue 2768113002: WIP: Create a LongStringCollection that transfers long strings with fewer copies.
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/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 231a191472b52a69bbbb9181c1aabf4a23e0127a..f68942f0ee40a79f61a4a66b084f212dcfaa2014 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -281,6 +281,10 @@ void V8Window::postMessageMethodCustom(
SerializedScriptValue::SerializeOptions options;
options.transferables = &transferables;
+ if (window->isLocalDOMWindow()) {
+ options.longStringPolicy =
+ LongStringPolicy(LongStringPolicy::kSameIsolate, 512);
+ }
RefPtr<SerializedScriptValue> message = SerializedScriptValue::serialize(
info.GetIsolate(), info[0], options, exceptionState);
if (exceptionState.hadException())

Powered by Google App Engine
This is Rietveld 408576698