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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.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/SerializedScriptValue.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
index 0049d6e66d02c98acfbcea0a046416fcee5317d9..ee261940314e2d2c29bbd9138db1de7c876e2526 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
@@ -85,6 +85,11 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValue::create() {
}
PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(
+ LongStringPolicy longStringPolicy) {
+ return adoptRef(new SerializedScriptValue(longStringPolicy));
+}
+
+PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(
const String& data) {
return adoptRef(new SerializedScriptValue(data));
}
@@ -111,6 +116,11 @@ SerializedScriptValue::SerializedScriptValue()
: m_hasRegisteredExternalAllocation(false),
m_transferablesNeedExternalAllocationRegistration(false) {}
+SerializedScriptValue::SerializedScriptValue(LongStringPolicy longStringPolicy)
+ : m_longStrings(longStringPolicy),
+ m_hasRegisteredExternalAllocation(false),
+ m_transferablesNeedExternalAllocationRegistration(false) {}
+
SerializedScriptValue::SerializedScriptValue(const String& wireData)
: m_hasRegisteredExternalAllocation(false),
m_transferablesNeedExternalAllocationRegistration(false) {

Powered by Google App Engine
This is Rietveld 408576698