Skip to content

Commit

Permalink
DevTools: Make domains promisified by default
Browse files Browse the repository at this point in the history
BUG=718063

Review-Url: https://codereview.chromium.org/2863433002
Cr-Commit-Position: refs/heads/master@{#469059}
  • Loading branch information
a1ph authored and Commit bot committed May 3, 2017
1 parent 7cefcda commit 85245cf
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions scripts/build/generate_protocol_externs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,21 @@

ref_types = {}

PROMISIFIED_DOMAINS = frozenset([
"HeapProfiler",
"Profiler",
NON_PROMISIFIED_DOMAINS = frozenset([
"Accessibility",
"Animation",
"ApplicationCache",
"CacheStorage",
"CSS",
"Debugger",
"DOM",
"DOMDebugger",
"IndexedDB",
"LayerTree",
"Network",
"Page",
"Runtime",
"Target",
])


Expand Down Expand Up @@ -122,7 +134,7 @@ def generate_protocol_externs(output_path, file1, file2):

for domain in domains:
domain_name = domain["domain"]
is_promisified = domain_name in PROMISIFIED_DOMAINS
is_promisified = domain_name not in NON_PROMISIFIED_DOMAINS

output_file.write("Protocol.%s = {};\n" % domain_name)
output_file.write("\n\n/**\n * @constructor\n*/\n")
Expand Down

0 comments on commit 85245cf

Please sign in to comment.