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

Unified Diff: include/v8.h

Issue 2307603002: Throw exceptions for errors in v8::ValueSerializer. (Closed)
Patch Set: virtual destructor to make clang happy 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') | src/value-serializer.h » ('J')
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 713bbccd544c3c4c2d3a45a63ee2782bd6345cb7..616dc921e3dee0341a087f9793c964168b457c0b 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1670,7 +1670,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') | src/value-serializer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698