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

Unified Diff: Source/bindings/v8/SerializedScriptValue.cpp

Issue 24876004: Move SerializedScriptValue wire format version to public header (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added the k back in Created 7 years, 3 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
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/SerializedScriptValue.cpp
diff --git a/Source/bindings/v8/SerializedScriptValue.cpp b/Source/bindings/v8/SerializedScriptValue.cpp
index 8f9d608ca6af9dff052d5fc461b28a319da75e2e..3f0ef96b2b11ef469d181081522e6c94380e3b1a 100644
--- a/Source/bindings/v8/SerializedScriptValue.cpp
+++ b/Source/bindings/v8/SerializedScriptValue.cpp
@@ -239,10 +239,6 @@ static bool shouldCheckForCycles(int depth)
return !(depth & (depth - 1));
}
-// Increment this for each incompatible change to the wire format.
-// Version 2: Added StringUCharTag for UChar v8 strings.
-static const uint32_t wireFormatVersion = 2;
-
static const int maxDepth = 20000;
// VarInt encoding constants.
@@ -366,7 +362,7 @@ public:
void writeVersion()
{
append(VersionTag);
- doWriteUint32(wireFormatVersion);
+ doWriteUint32(SerializedScriptValue::wireFormatVersion);
}
void writeInt32(int32_t value)
@@ -1984,7 +1980,7 @@ public:
v8::Handle<v8::Value> deserialize()
{
- if (!m_reader.readVersion(m_version) || m_version > wireFormatVersion)
+ if (!m_reader.readVersion(m_version) || m_version > SerializedScriptValue::wireFormatVersion)
return v8NullWithCheck(m_reader.getIsolate());
m_reader.setVersion(m_version);
v8::HandleScope scope(m_reader.getIsolate());
@@ -2535,9 +2531,4 @@ SerializedScriptValue::~SerializedScriptValue()
}
}
-uint32_t SerializedScriptValue::wireFormatVersion()
-{
- return WebCore::wireFormatVersion;
-}
-
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698