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

Unified Diff: third_party/protobuf/ruby/ext/google/protobuf_c/defs.c

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 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 | « third_party/protobuf/ruby/Rakefile ('k') | third_party/protobuf/ruby/ext/google/protobuf_c/encode_decode.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/ruby/ext/google/protobuf_c/defs.c
diff --git a/third_party/protobuf/ruby/ext/google/protobuf_c/defs.c b/third_party/protobuf/ruby/ext/google/protobuf_c/defs.c
index 7e0cd14cef0a8f6ee1df3380cc5187658af27223..7e93bafb33c4a3b15746491d74f9163a049e2728 100644
--- a/third_party/protobuf/ruby/ext/google/protobuf_c/defs.c
+++ b/third_party/protobuf/ruby/ext/google/protobuf_c/defs.c
@@ -243,6 +243,10 @@ void Descriptor_free(void* _self) {
if (self->fill_method) {
upb_pbdecodermethod_unref(self->fill_method, &self->fill_method);
}
+ if (self->json_fill_method) {
+ upb_json_parsermethod_unref(self->json_fill_method,
+ &self->json_fill_method);
+ }
if (self->pb_serialize_handlers) {
upb_handlers_unref(self->pb_serialize_handlers,
&self->pb_serialize_handlers);
@@ -251,6 +255,10 @@ void Descriptor_free(void* _self) {
upb_handlers_unref(self->json_serialize_handlers,
&self->json_serialize_handlers);
}
+ if (self->json_serialize_handlers_preserve) {
+ upb_handlers_unref(self->json_serialize_handlers_preserve,
+ &self->json_serialize_handlers_preserve);
+ }
xfree(self);
}
@@ -271,8 +279,10 @@ VALUE Descriptor_alloc(VALUE klass) {
self->layout = NULL;
self->fill_handlers = NULL;
self->fill_method = NULL;
+ self->json_fill_method = NULL;
self->pb_serialize_handlers = NULL;
self->json_serialize_handlers = NULL;
+ self->json_serialize_handlers_preserve = NULL;
self->typeclass_references = rb_ary_new();
return ret;
}
« no previous file with comments | « third_party/protobuf/ruby/Rakefile ('k') | third_party/protobuf/ruby/ext/google/protobuf_c/encode_decode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698