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

Unified Diff: third_party/protobuf/patches/0001-ignore-option-retain-unknown-fields.patch

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 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: third_party/protobuf/patches/0001-ignore-option-retain-unknown-fields.patch
diff --git a/third_party/protobuf/patches/0001-ignore-option-retain-unknown-fields.patch b/third_party/protobuf/patches/0001-ignore-option-retain-unknown-fields.patch
new file mode 100644
index 0000000000000000000000000000000000000000..291b9926884ca6eda86262dbb273359dadbeb6f3
--- /dev/null
+++ b/third_party/protobuf/patches/0001-ignore-option-retain-unknown-fields.patch
@@ -0,0 +1,21 @@
+--- protobuf-cleaned/src/google/protobuf/descriptor.cc 2015-12-30 13:21:46.000000000 -0800
++++ protobuf-patched/src/google/protobuf/descriptor.cc 2016-03-31 13:25:26.840024811 -0700
+@@ -5591,6 +5591,18 @@
+ "\"uninterpreted_option\".");
+ }
+
++ // TODO(xyzzyz): remove when all uses in Chromium are removed
++ if (uninterpreted_option_->name(0).name_part() == "retain_unknown_fields") {
++ // Chromium patch to protobuf used to introduce a retain_unknown_fields
++ // option that would make the protobuf_lite runtime retain unknown fields
++ // just like the protobuf_full would. A newer upstream version of protobuf
++ // retains these unknown fields even in lite runtime, so the option is no
++ // longer necessary. Therefore, we ignore this option, and when we remove
++ // all the occurrences of the option from Chromium, we can remove this
++ // ignore.
++ return true;
++ }
++
+ const Descriptor* options_descriptor = NULL;
+ // Get the options message's descriptor from the builder's pool, so that we
+ // get the version that knows about any extension options declared in the

Powered by Google App Engine
This is Rietveld 408576698