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

Unified Diff: third_party/protobuf/js/debug.js

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Update to new HEAD (b7632464b4) + restore GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER Created 4 years, 1 month 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/js/debug.js
diff --git a/third_party/protobuf/js/debug.js b/third_party/protobuf/js/debug.js
index 3701a0957ea05863dee4f547545cc9da9b8b529c..46b24853150af52ee70024f18beeb0680398fcf0 100644
--- a/third_party/protobuf/js/debug.js
+++ b/third_party/protobuf/js/debug.js
@@ -94,8 +94,9 @@ jspb.debug.dump_ = function(thing) {
var match = /^get([A-Z]\w*)/.exec(name);
if (match && name != 'getExtension' &&
name != 'getJsPbMessageId') {
- var val = thing[name]();
- if (val != null) {
+ var has = 'has' + match[1];
+ if (!thing[has] || thing[has]()) {
+ var val = thing[name]();
object[jspb.debug.formatFieldName_(match[1])] = jspb.debug.dump_(val);
}
}

Powered by Google App Engine
This is Rietveld 408576698