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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index e6c14d5a903eafaf2e9f29463e3a24651ea13d45..e11597a3f18a869b6c3b54680add486279f997f8 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1671,7 +1671,20 @@ class V8_EXPORT JSON {
*/
class V8_EXPORT ValueSerializer {
public:
+ class V8_EXPORT Delegate {
+ public:
+ virtual ~Delegate() {}
+
+ /*
+ * Handles the case where a DataCloneError would be thrown in the structured
+ * clone spec. Other V8 embedders may throw some other appropriate exception
+ * type.
+ */
+ virtual void ThrowDataCloneError(Local<String> message) = 0;
+ };
+
explicit ValueSerializer(Isolate* isolate);
+ ValueSerializer(Isolate* isolate, Delegate* delegate);
~ValueSerializer();
/*
« 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