OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // V8. When serialization is successful, |didThrow| is false. | 76 // V8. When serialization is successful, |didThrow| is false. |
77 static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, Messa
gePortArray*, ArrayBufferArray*, ExceptionState&, v8::Isolate*); | 77 static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, Messa
gePortArray*, ArrayBufferArray*, ExceptionState&, v8::Isolate*); |
78 static PassRefPtr<SerializedScriptValue> createFromWire(const String&); | 78 static PassRefPtr<SerializedScriptValue> createFromWire(const String&); |
79 static PassRefPtr<SerializedScriptValue> createFromWireBytes(const Vector<ui
nt8_t>&); | 79 static PassRefPtr<SerializedScriptValue> createFromWireBytes(const Vector<ui
nt8_t>&); |
80 static PassRefPtr<SerializedScriptValue> create(const String&); | 80 static PassRefPtr<SerializedScriptValue> create(const String&); |
81 static PassRefPtr<SerializedScriptValue> create(const String&, v8::Isolate*)
; | 81 static PassRefPtr<SerializedScriptValue> create(const String&, v8::Isolate*)
; |
82 static PassRefPtr<SerializedScriptValue> create(); | 82 static PassRefPtr<SerializedScriptValue> create(); |
83 static PassRefPtr<SerializedScriptValue> create(const ScriptValue&, WebBlobI
nfoArray*, ExceptionState&, v8::Isolate*); | 83 static PassRefPtr<SerializedScriptValue> create(const ScriptValue&, WebBlobI
nfoArray*, ExceptionState&, v8::Isolate*); |
84 | 84 |
85 // Never throws exceptions. | 85 // Never throws exceptions. |
86 static PassRefPtr<SerializedScriptValue> createAndSwallowExceptions(v8::Hand
le<v8::Value>, v8::Isolate*); | 86 static PassRefPtr<SerializedScriptValue> createAndSwallowExceptions(v8::Isol
ate*, v8::Handle<v8::Value>); |
87 | 87 |
88 static PassRefPtr<SerializedScriptValue> nullValue(); | 88 static PassRefPtr<SerializedScriptValue> nullValue(); |
89 | 89 |
90 String toWireString() const { return m_data; } | 90 String toWireString() const { return m_data; } |
91 void toWireBytes(Vector<char>&) const; | 91 void toWireBytes(Vector<char>&) const; |
92 | 92 |
93 // Deserializes the value (in the current context). Returns a null value in | 93 // Deserializes the value (in the current context). Returns a null value in |
94 // case of failure. | 94 // case of failure. |
95 v8::Handle<v8::Value> deserialize(MessagePortArray* = 0); | 95 v8::Handle<v8::Value> deserialize(MessagePortArray* = 0); |
96 v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0, const
WebBlobInfoArray* = 0); | 96 v8::Handle<v8::Value> deserialize(v8::Isolate*, MessagePortArray* = 0, const
WebBlobInfoArray* = 0); |
(...skipping 25 matching lines...) Expand all Loading... |
122 | 122 |
123 String m_data; | 123 String m_data; |
124 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; | 124 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; |
125 BlobDataHandleMap m_blobDataHandles; | 125 BlobDataHandleMap m_blobDataHandles; |
126 intptr_t m_externallyAllocatedMemory; | 126 intptr_t m_externallyAllocatedMemory; |
127 }; | 127 }; |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
130 | 130 |
131 #endif // SerializedScriptValue_h | 131 #endif // SerializedScriptValue_h |
OLD | NEW |