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

Side by Side Diff: Source/bindings/v8/SerializedScriptValue.h

Issue 100023005: Make cloning of File objects more useful. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reupload Created 7 years 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray; 52 typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray;
53 typedef Vector<RefPtr<WTF::ArrayBuffer>, 1> ArrayBufferArray; 53 typedef Vector<RefPtr<WTF::ArrayBuffer>, 1> ArrayBufferArray;
54 typedef HashMap<String, RefPtr<BlobDataHandle> > BlobDataHandleMap; 54 typedef HashMap<String, RefPtr<BlobDataHandle> > BlobDataHandleMap;
55 55
56 class SerializedScriptValue FINAL : public ThreadSafeRefCounted<SerializedScript Value> { 56 class SerializedScriptValue FINAL : public ThreadSafeRefCounted<SerializedScript Value> {
57 public: 57 public:
58 // Increment this for each incompatible change to the wire format. 58 // Increment this for each incompatible change to the wire format.
59 // Version 2: Added StringUCharTag for UChar v8 strings. 59 // Version 2: Added StringUCharTag for UChar v8 strings.
60 // Version 3: Switched to using uuids as blob data identifiers. 60 // Version 3: Switched to using uuids as blob data identifiers.
61 static const uint32_t wireFormatVersion = 3; 61 // Version 4: Extended File serialization to be complete.
62 static const uint32_t wireFormatVersion = 4;
62 63
63 ~SerializedScriptValue(); 64 ~SerializedScriptValue();
64 65
65 // If a serialization error occurs (e.g., cyclic input value) this 66 // If a serialization error occurs (e.g., cyclic input value) this
66 // function returns an empty representation, schedules a V8 exception to 67 // function returns an empty representation, schedules a V8 exception to
67 // be thrown using v8::ThrowException(), and sets |didThrow|. In this case 68 // be thrown using v8::ThrowException(), and sets |didThrow|. In this case
68 // the caller must not invoke any V8 operations until control returns to 69 // the caller must not invoke any V8 operations until control returns to
69 // V8. When serialization is successful, |didThrow| is false. 70 // V8. When serialization is successful, |didThrow| is false.
70 static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, Messa gePortArray*, ArrayBufferArray*, bool& didThrow, v8::Isolate*); 71 static PassRefPtr<SerializedScriptValue> create(v8::Handle<v8::Value>, Messa gePortArray*, ArrayBufferArray*, bool& didThrow, v8::Isolate*);
71 static PassRefPtr<SerializedScriptValue> createFromWire(const String&); 72 static PassRefPtr<SerializedScriptValue> createFromWire(const String&);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 String m_data; 121 String m_data;
121 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray; 122 OwnPtr<ArrayBufferContentsArray> m_arrayBufferContentsArray;
122 BlobDataHandleMap m_blobDataHandles; 123 BlobDataHandleMap m_blobDataHandles;
123 intptr_t m_externallyAllocatedMemory; 124 intptr_t m_externallyAllocatedMemory;
124 }; 125 };
125 126
126 } // namespace WebCore 127 } // namespace WebCore
127 128
128 #endif // SerializedScriptValue_h 129 #endif // SerializedScriptValue_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/storage/serialized-script-value-expected.txt ('k') | Source/bindings/v8/SerializedScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698