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

Side by Side Diff: include/v8.h

Issue 2307603002: Throw exceptions for errors in v8::ValueSerializer. (Closed)
Patch Set: fix comment Created 4 years, 3 months 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 /** 1664 /**
1665 * Value serialization compatible with the HTML structured clone algorithm. 1665 * Value serialization compatible with the HTML structured clone algorithm.
1666 * The format is backward-compatible (i.e. safe to store to disk). 1666 * The format is backward-compatible (i.e. safe to store to disk).
1667 * 1667 *
1668 * WARNING: This API is under development, and changes (including incompatible 1668 * WARNING: This API is under development, and changes (including incompatible
1669 * changes to the API or wire format) may occur without notice until this 1669 * changes to the API or wire format) may occur without notice until this
1670 * warning is removed. 1670 * warning is removed.
1671 */ 1671 */
1672 class V8_EXPORT ValueSerializer { 1672 class V8_EXPORT ValueSerializer {
1673 public: 1673 public:
1674 class V8_EXPORT Delegate {
1675 public:
1676 virtual ~Delegate() {}
1677
1678 /*
1679 * Handles the case where a DataCloneError would be thrown in the structured
1680 * clone spec. Other V8 embedders may throw some other appropriate exception
1681 * type.
1682 */
1683 virtual void ThrowDataCloneError(Local<String> message) = 0;
1684 };
1685
1674 explicit ValueSerializer(Isolate* isolate); 1686 explicit ValueSerializer(Isolate* isolate);
1687 ValueSerializer(Isolate* isolate, Delegate* delegate);
1675 ~ValueSerializer(); 1688 ~ValueSerializer();
1676 1689
1677 /* 1690 /*
1678 * Writes out a header, which includes the format version. 1691 * Writes out a header, which includes the format version.
1679 */ 1692 */
1680 void WriteHeader(); 1693 void WriteHeader();
1681 1694
1682 /* 1695 /*
1683 * Serializes a JavaScript value into the buffer. 1696 * Serializes a JavaScript value into the buffer.
1684 */ 1697 */
(...skipping 7683 matching lines...) Expand 10 before | Expand all | Expand 10 after
9368 */ 9381 */
9369 9382
9370 9383
9371 } // namespace v8 9384 } // namespace v8
9372 9385
9373 9386
9374 #undef TYPE_CHECK 9387 #undef TYPE_CHECK
9375 9388
9376 9389
9377 #endif // INCLUDE_V8_H_ 9390 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698