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

Unified Diff: third_party/WebKit/Source/build/scripts/json5_generator.py

Issue 2645283006: Convert make_qualified_names and make_element_factory to use JSON5. (Closed)
Patch Set: Fix parameters skip Created 3 years, 11 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/WebKit/Source/build/scripts/json5_generator.py
diff --git a/third_party/WebKit/Source/build/scripts/json5_generator.py b/third_party/WebKit/Source/build/scripts/json5_generator.py
index 00f4e9ad937ce91117d6005bf843b78ce5a2a332..e7a21b23763d64e2649427fdeb42be9726dbf882 100644
--- a/third_party/WebKit/Source/build/scripts/json5_generator.py
+++ b/third_party/WebKit/Source/build/scripts/json5_generator.py
@@ -153,14 +153,17 @@ class Json5File(object):
if "name" not in item:
raise Exception("Missing name in item: %s" % item)
entry["name"] = item.pop("name")
+ # Valid parameters if it's specified.
for key, value in item.items():
+ entry[key] = value
sashab 2017/01/31 23:09:19 Why did you move this up here?
ktyliu 2017/01/31 23:42:06 I am doing a "continue" below (for the case where
+ if not self.parameters:
+ continue
if key not in self.parameters:
raise Exception(
"Unknown parameter: '%s'\nKnown params: %s" %
(key, self.parameters.keys()))
if self.parameters[key]:
self._validate_parameter(self.parameters[key], value)
- entry[key] = value
return entry
def _validate_parameter(self, parameter, value):

Powered by Google App Engine
This is Rietveld 408576698