Index: Source/bindings/core/v8/ScriptValueSerializer.h |
diff --git a/Source/bindings/core/v8/ScriptValueSerializer.h b/Source/bindings/core/v8/ScriptValueSerializer.h |
index 1b6c26706641ac48b1f99918cbabdac238a9f41c..c9c024522b99aef48611626d1edfb3782e2d2138 100644 |
--- a/Source/bindings/core/v8/ScriptValueSerializer.h |
+++ b/Source/bindings/core/v8/ScriptValueSerializer.h |
@@ -8,9 +8,6 @@ |
#include "bindings/core/v8/SerializationTag.h" |
#include "bindings/core/v8/SerializedScriptValue.h" |
#include "bindings/core/v8/V8Binding.h" |
-#include "public/platform/WebCrypto.h" |
-#include "public/platform/WebCryptoKey.h" |
-#include "public/platform/WebCryptoKeyAlgorithm.h" |
#include "wtf/ArrayBufferContents.h" |
#include "wtf/HashMap.h" |
#include "wtf/Noncopyable.h" |
@@ -131,12 +128,10 @@ public: |
void writeNumberObject(double number); |
void writeBlob(const String& uuid, const String& type, unsigned long long size); |
void writeBlobIndex(int blobIndex); |
- void writeDOMFileSystem(int type, const String& name, const String& url); |
void writeFile(const File&); |
void writeFileIndex(int blobIndex); |
void writeFileList(const FileList&); |
void writeFileListIndex(const Vector<int>& blobIndices); |
- bool writeCryptoKey(const WebCryptoKey&); |
void writeArrayBuffer(const ArrayBuffer&); |
void writeArrayBufferView(const ArrayBufferView&); |
void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelData, uint32_t pixelDataLength); |
@@ -158,14 +153,6 @@ protected: |
void doWriteArrayBuffer(const ArrayBuffer&); |
void doWriteString(const char* data, int length); |
void doWriteWebCoreString(const String&); |
- void doWriteHmacKey(const WebCryptoKey&); |
- void doWriteAesKey(const WebCryptoKey&); |
- void doWriteRsaHashedKey(const WebCryptoKey&); |
- void doWriteEcKey(const WebCryptoKey&); |
- void doWriteAlgorithmId(WebCryptoAlgorithmId); |
- void doWriteAsymmetricKeyType(WebCryptoKeyType); |
- void doWriteNamedCurve(WebCryptoNamedCurve); |
- void doWriteKeyUsages(const WebCryptoKeyUsageMask usages, bool extractable); |
int bytesNeededToWireEncode(uint32_t value); |
template<class T> |
@@ -218,7 +205,7 @@ public: |
String errorMessage() { return m_errorMessage; } |
// Functions used by serialization states. |
- Serializer::StateBase* doSerialize(v8::Handle<v8::Value>, Serializer::StateBase* next); |
+ virtual Serializer::StateBase* doSerialize(v8::Handle<v8::Value>, Serializer::StateBase* next); |
StateBase* doSerializeArrayBuffer(v8::Handle<v8::Value> arrayBuffer, StateBase* next); |
StateBase* checkException(StateBase*); |
@@ -375,10 +362,8 @@ private: |
void writeNumberObject(v8::Handle<v8::Value>); |
void writeBooleanObject(v8::Handle<v8::Value>); |
StateBase* writeBlob(v8::Handle<v8::Value>, StateBase* next); |
- StateBase* writeDOMFileSystem(v8::Handle<v8::Value>, StateBase* next); |
StateBase* writeFile(v8::Handle<v8::Value>, StateBase* next); |
StateBase* writeFileList(v8::Handle<v8::Value>, StateBase* next); |
- bool writeCryptoKey(v8::Handle<v8::Value>); |
void writeImageData(v8::Handle<v8::Value>); |
void writeRegExp(v8::Handle<v8::Value>); |
StateBase* writeAndGreyArrayBufferView(v8::Handle<v8::Object>, StateBase* next); |
@@ -475,14 +460,20 @@ protected: |
} |
public: |
- bool read(v8::Handle<v8::Value>*, CompositeCreator&); |
+ virtual bool read(v8::Handle<v8::Value>*, CompositeCreator&); |
bool readVersion(uint32_t& version); |
void setVersion(uint32_t); |
-private: |
+protected: |
+ bool readWithTag(SerializationTag, v8::Handle<v8::Value>*, CompositeCreator&); |
+ |
bool readTag(SerializationTag*); |
bool readWebCoreString(String*); |
bool readUint32(v8::Handle<v8::Value>*); |
+ |
+ bool doReadUint32(uint32_t* value); |
+ |
+private: |
void undoReadTag(); |
bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*); |
bool readString(v8::Handle<v8::Value>*); |
@@ -498,10 +489,8 @@ private: |
bool readArrayBufferView(v8::Handle<v8::Value>*, CompositeCreator&); |
bool readRegExp(v8::Handle<v8::Value>*); |
bool readBlob(v8::Handle<v8::Value>*, bool isIndexed); |
- bool readDOMFileSystem(v8::Handle<v8::Value>*); |
bool readFile(v8::Handle<v8::Value>*, bool isIndexed); |
bool readFileList(v8::Handle<v8::Value>*, bool isIndexed); |
- bool readCryptoKey(v8::Handle<v8::Value>*); |
File* readFileHelper(); |
File* readFileIndexHelper(); |
@@ -521,18 +510,9 @@ private: |
return true; |
} |
- bool doReadUint32(uint32_t* value); |
bool doReadUint64(uint64_t* value); |
bool doReadNumber(double* number); |
PassRefPtr<BlobDataHandle> getOrCreateBlobDataHandle(const String& uuid, const String& type, long long size = -1); |
- bool doReadHmacKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&); |
- bool doReadAesKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&); |
- bool doReadRsaHashedKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&); |
- bool doReadEcKey(WebCryptoKeyAlgorithm&, WebCryptoKeyType&); |
- bool doReadAlgorithmId(WebCryptoAlgorithmId&); |
- bool doReadAsymmetricKeyType(WebCryptoKeyType&); |
- bool doReadNamedCurve(WebCryptoNamedCurve&); |
- bool doReadKeyUsages(WebCryptoKeyUsageMask& usages, bool& extractable); |
private: |
RefPtr<ScriptState> m_scriptState; |
@@ -573,7 +553,7 @@ public: |
protected: |
Reader& reader() { return m_reader; } |
- bool read(v8::Local<v8::Value>*); |
+ virtual bool read(v8::Local<v8::Value>*); |
private: |
bool initializeObject(v8::Handle<v8::Object>, uint32_t numProperties, v8::Handle<v8::Value>*); |