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

Unified Diff: public/web/WebSerializedScriptValueVersion.h

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/web/AssertMatchingEnums.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebSerializedScriptValueVersion.h
diff --git a/Source/web/WebScriptBindings.cpp b/public/web/WebSerializedScriptValueVersion.h
similarity index 78%
copy from Source/web/WebScriptBindings.cpp
copy to public/web/WebSerializedScriptValueVersion.h
index 7b61b3550f64f32750590a7e5898d21bb88f0454..b18849d9f48919d6443b2882fd0c1c17339fe852 100644
--- a/Source/web/WebScriptBindings.cpp
+++ b/public/web/WebSerializedScriptValueVersion.h
@@ -28,24 +28,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "public/web/WebScriptBindings.h"
-
-#include "bindings/v8/V8Binding.h"
-#include "public/platform/WebString.h"
-
-using namespace WebCore;
+#ifndef WebSerializedScriptValueVersion_h
+#define WebSerializedScriptValueVersion_h
namespace WebKit {
-v8::Local<v8::String> WebScriptBindings::toV8String(const WebString& string, v8::Isolate* isolate)
-{
- return v8String(string, isolate);
-}
-
-WebString WebScriptBindings::toWebString(v8::Handle<v8::String> v8String)
-{
- return v8StringToWebCoreString<String>(v8String, Externalize);
-}
+// SerializedScriptValue wire format version. Versions higher than
+// this value will not be deserializable by WebSerializedScriptValue.
+// Embedders may serialize this as out-of-band metadata along with
+// collections of serialized data so that version skew can be detected
+// before deserializing individual values.
+const unsigned kSerializedScriptValueVersion = 2;
} // namespace WebKit
+
+#endif // WebSerializedScriptValueVersion_h
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698