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

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

Issue 718383003: bindings: fixed incorrect dependency of SerializedScriptValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 "config.h"
6 #include "bindings/modules/v8/SerializedScriptValueForModulesFactory.h"
7
8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/modules/v8/ScriptValueSerializerForModules.h"
10 #include "bindings/modules/v8/SerializedScriptValueForModules.h"
11
12 namespace blink {
13
14 PassRefPtr<SerializedScriptValue> SerializedScriptValueForModulesFactory::create (v8::Handle<v8::Value> value, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, ExceptionState& exceptionState, v8::Isolate* isolate)
15 {
16 return adoptRef(new SerializedScriptValueForModules(value, messagePorts, arr ayBuffers, 0, exceptionState, isolate));
17 }
18
19 PassRefPtr<SerializedScriptValue> SerializedScriptValueForModulesFactory::create (const ScriptValue& value, WebBlobInfoArray* blobInfo, ExceptionState& exception State, v8::Isolate* isolate)
20 {
21 ASSERT(isolate->InContext());
22 return adoptRef(new SerializedScriptValueForModules(value.v8Value(), 0, 0, b lobInfo, exceptionState, isolate));
23 }
24
25 PassRefPtr<SerializedScriptValue> SerializedScriptValueForModulesFactory::create FromWire(const String& data)
26 {
27 return adoptRef(new SerializedScriptValueForModules(data));
28 }
29
30 PassRefPtr<SerializedScriptValue> SerializedScriptValueForModulesFactory::create (const String& data, v8::Isolate* isolate)
31 {
32 SerializedScriptValueInternal::WriterForModules writer;
haraken 2014/11/17 01:27:50 I wonder why you need a SerializedScriptValueInter
tasak 2014/11/17 08:42:30 Done.
33 writer.writeWebCoreString(data);
34 String wireData = writer.takeWireString();
35 return createFromWire(wireData);
36 }
37
38 PassRefPtr<SerializedScriptValue> SerializedScriptValueForModulesFactory::create ()
39 {
40 return adoptRef(new SerializedScriptValueForModules());
41 }
42
43 } // namespace blink
44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698