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

Unified Diff: src/api.cc

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 | « include/v8.h ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 77443f6ba6f1f6cd3fcd4678c250c5cc6b3ecc6b..b712d521fd235229ffe2d2a14cdd3afdb0720ddf 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2838,13 +2838,18 @@ MaybeLocal<String> JSON::Stringify(Local<Context> context,
// --- V a l u e S e r i a l i z a t i o n ---
struct ValueSerializer::PrivateData {
- explicit PrivateData(i::Isolate* i) : isolate(i), serializer(i) {}
+ explicit PrivateData(i::Isolate* i, ValueSerializer::Delegate* delegate)
+ : isolate(i), serializer(i, delegate) {}
i::Isolate* isolate;
i::ValueSerializer serializer;
};
ValueSerializer::ValueSerializer(Isolate* isolate)
- : private_(new PrivateData(reinterpret_cast<i::Isolate*>(isolate))) {}
+ : ValueSerializer(isolate, nullptr) {}
+
+ValueSerializer::ValueSerializer(Isolate* isolate, Delegate* delegate)
+ : private_(
+ new PrivateData(reinterpret_cast<i::Isolate*>(isolate), delegate)) {}
ValueSerializer::~ValueSerializer() { delete private_; }
« no previous file with comments | « include/v8.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698