| OLD | NEW |
| (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 | |
| OLD | NEW |