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

Unified Diff: Source/core/inspector/CodeGeneratorInspector.py

Issue 958893002: Inspector: Store array of small numbers in 16 bit instead of 64 bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | Source/core/inspector/CodeGeneratorInspectorStrings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/CodeGeneratorInspector.py
diff --git a/Source/core/inspector/CodeGeneratorInspector.py b/Source/core/inspector/CodeGeneratorInspector.py
index 70c7e6c394951bc19ef841439625532986755fd4..59595d6a97f990777a151528243f904831d4b7db 100755
--- a/Source/core/inspector/CodeGeneratorInspector.py
+++ b/Source/core/inspector/CodeGeneratorInspector.py
@@ -1882,6 +1882,7 @@ class Generator:
commandNameIndex=cmd_enum_name))
declaration_command_name = "%s.%s\\0" % (domain_name, json_command_name)
Generator.backend_method_name_declaration_list.append(" \"%s\"" % declaration_command_name)
+ assert Generator.backend_method_name_declaration_current_index < 2 ** 16, "Number too large for unsigned short."
Generator.backend_method_name_declaration_index_list.append(" %d," % Generator.backend_method_name_declaration_current_index)
Generator.backend_method_name_declaration_current_index += len(declaration_command_name) - 1
« no previous file with comments | « no previous file | Source/core/inspector/CodeGeneratorInspectorStrings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698