OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 /** | 1663 /** |
1664 * Value serialization compatible with the HTML structured clone algorithm. | 1664 * Value serialization compatible with the HTML structured clone algorithm. |
1665 * The format is backward-compatible (i.e. safe to store to disk). | 1665 * The format is backward-compatible (i.e. safe to store to disk). |
1666 * | 1666 * |
1667 * WARNING: This API is under development, and changes (including incompatible | 1667 * WARNING: This API is under development, and changes (including incompatible |
1668 * changes to the API or wire format) may occur without notice until this | 1668 * changes to the API or wire format) may occur without notice until this |
1669 * warning is removed. | 1669 * warning is removed. |
1670 */ | 1670 */ |
1671 class V8_EXPORT ValueSerializer { | 1671 class V8_EXPORT ValueSerializer { |
1672 public: | 1672 public: |
| 1673 class V8_EXPORT Delegate { |
| 1674 public: |
| 1675 virtual ~Delegate() {} |
| 1676 |
| 1677 /* |
| 1678 * Handles the case where a DataCloneError would be thrown in the structured |
| 1679 * clone spec. Other V8 embedders may throw some other appropriate exception |
| 1680 * type. |
| 1681 */ |
| 1682 virtual void ThrowDataCloneError(Local<String> message) = 0; |
| 1683 }; |
| 1684 |
1673 explicit ValueSerializer(Isolate* isolate); | 1685 explicit ValueSerializer(Isolate* isolate); |
| 1686 ValueSerializer(Isolate* isolate, Delegate* delegate); |
1674 ~ValueSerializer(); | 1687 ~ValueSerializer(); |
1675 | 1688 |
1676 /* | 1689 /* |
1677 * Writes out a header, which includes the format version. | 1690 * Writes out a header, which includes the format version. |
1678 */ | 1691 */ |
1679 void WriteHeader(); | 1692 void WriteHeader(); |
1680 | 1693 |
1681 /* | 1694 /* |
1682 * Serializes a JavaScript value into the buffer. | 1695 * Serializes a JavaScript value into the buffer. |
1683 */ | 1696 */ |
(...skipping 7579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9263 */ | 9276 */ |
9264 | 9277 |
9265 | 9278 |
9266 } // namespace v8 | 9279 } // namespace v8 |
9267 | 9280 |
9268 | 9281 |
9269 #undef TYPE_CHECK | 9282 #undef TYPE_CHECK |
9270 | 9283 |
9271 | 9284 |
9272 #endif // INCLUDE_V8_H_ | 9285 #endif // INCLUDE_V8_H_ |
OLD | NEW |