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

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 typo __majson5__ -> __main__ in make_qualified_names.py Created 3 years, 10 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 | « no previous file | third_party/WebKit/Source/build/scripts/make_element_factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c7a63d7f2fd7d677095f69ab9a0e5fa36f33897..5b7184b3264ab86bfaa9e87747c753c573526882 100644
--- a/third_party/WebKit/Source/build/scripts/json5_generator.py
+++ b/third_party/WebKit/Source/build/scripts/json5_generator.py
@@ -152,7 +152,11 @@ class Json5File(object):
return entry
if "name" not in item:
raise Exception("Missing name in item: %s" % item)
+ if not self.parameters:
+ entry.update(item)
+ return entry
entry["name"] = item.pop("name")
+ # Validate parameters if it's specified.
for key, value in item.items():
if key not in self.parameters:
raise Exception(
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/make_element_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698