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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp

Issue 2857143005: Gather serialization-related code into a directory. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "bindings/modules/v8/SerializedScriptValueForModulesFactory.h"
6
7 #include "bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules. h"
8 #include "bindings/modules/v8/serialization/V8ScriptValueSerializerForModules.h"
9 #include "platform/instrumentation/tracing/TraceEvent.h"
10
11 namespace blink {
12
13 PassRefPtr<SerializedScriptValue>
14 SerializedScriptValueForModulesFactory::Create(
15 v8::Isolate* isolate,
16 v8::Local<v8::Value> value,
17 const SerializedScriptValue::SerializeOptions& options,
18 ExceptionState& exception_state) {
19 TRACE_EVENT0("blink", "SerializedScriptValueFactory::create");
20 V8ScriptValueSerializerForModules serializer(ScriptState::Current(isolate),
21 options);
22 return serializer.Serialize(value, exception_state);
23 }
24
25 v8::Local<v8::Value> SerializedScriptValueForModulesFactory::Deserialize(
26 SerializedScriptValue* value,
27 v8::Isolate* isolate,
28 const SerializedScriptValue::DeserializeOptions& options) {
29 TRACE_EVENT0("blink", "SerializedScriptValueFactory::deserialize");
30 V8ScriptValueDeserializerForModules deserializer(
31 ScriptState::Current(isolate), value, options);
32 return deserializer.Deserialize();
33 }
34
35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698