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

Unified Diff: src/value-serializer.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
Index: src/value-serializer.h
diff --git a/src/value-serializer.h b/src/value-serializer.h
index 93fc15166d4d0b375039b6e548d2c324011c8950..bc4f4ca34460c8ebeb239642f1161dbccae2b977 100644
--- a/src/value-serializer.h
+++ b/src/value-serializer.h
@@ -12,6 +12,7 @@
#include "src/base/compiler-specific.h"
#include "src/base/macros.h"
#include "src/identity-map.h"
+#include "src/messages.h"
#include "src/vector.h"
#include "src/zone.h"
@@ -41,7 +42,7 @@ enum class SerializationTag : uint8_t;
*/
class ValueSerializer {
public:
- explicit ValueSerializer(Isolate* isolate);
+ ValueSerializer(Isolate* isolate, v8::ValueSerializer::Delegate* delegate);
~ValueSerializer();
/*
@@ -105,7 +106,16 @@ class ValueSerializer {
Maybe<uint32_t> WriteJSObjectProperties(
Handle<JSObject> object, Handle<FixedArray> keys) WARN_UNUSED_RESULT;
+ /*
+ * Asks the delegate to throw handle an error that occurred during data
Jakob Kummerow 2016/09/02 10:20:28 nit: s/throw handle/handle/
jbroman 2016/09/02 14:51:09 Done.
+ * cloning, by throwing an exception appropriate for the host.
+ */
+ void ThrowDataCloneError(MessageTemplate::Template template_index);
+ V8_NOINLINE void ThrowDataCloneError(MessageTemplate::Template template_index,
+ Handle<Object> arg0);
+
Isolate* const isolate_;
+ v8::ValueSerializer::Delegate* const delegate_;
std::vector<uint8_t> buffer_;
Zone zone_;
« no previous file with comments | « src/messages.h ('k') | src/value-serializer.cc » ('j') | src/value-serializer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698