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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/compile_frontend.py

Issue 1648523002: DevTools: move InjectedScript* to inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 Google Inc. All rights reserved. 2 # Copyright (c) 2012 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 # pylint: disable=E1103 69 # pylint: disable=E1103
70 return output.strip().replace('\\', '\\\\') 70 return output.strip().replace('\\', '\\\\')
71 71
72 scripts_path = path.dirname(path.abspath(__file__)) 72 scripts_path = path.dirname(path.abspath(__file__))
73 devtools_path = path.dirname(scripts_path) 73 devtools_path = path.dirname(scripts_path)
74 inspector_path = path.join(path.dirname(devtools_path), 'core', 'inspector') 74 inspector_path = path.join(path.dirname(devtools_path), 'core', 'inspector')
75 devtools_frontend_path = path.join(devtools_path, 'front_end') 75 devtools_frontend_path = path.join(devtools_path, 'front_end')
76 patched_es6_externs_file = to_platform_path(path.join(devtools_frontend_path, 'e s6.js')) 76 patched_es6_externs_file = to_platform_path(path.join(devtools_frontend_path, 'e s6.js'))
77 global_externs_file = to_platform_path(path.join(devtools_frontend_path, 'extern s.js')) 77 global_externs_file = to_platform_path(path.join(devtools_frontend_path, 'extern s.js'))
78 protocol_externs_file = path.join(devtools_frontend_path, 'protocol_externs.js') 78 protocol_externs_file = path.join(devtools_frontend_path, 'protocol_externs.js')
79 injected_script_source_name = path.join(inspector_path, 'InjectedScriptSource.js ') 79 injected_script_source_name = path.join(inspector_path, 'v8/InjectedScriptSource .js')
80 injected_script_externs_file = path.join(inspector_path, 'injected_script_extern s.js') 80 injected_script_externs_file = path.join(inspector_path, 'injected_script_extern s.js')
81 81
82 jsmodule_name_prefix = 'jsmodule_' 82 jsmodule_name_prefix = 'jsmodule_'
83 runtime_module_name = '_runtime' 83 runtime_module_name = '_runtime'
84 84
85 type_checked_jsdoc_tags_list = ['param', 'return', 'type', 'enum'] 85 type_checked_jsdoc_tags_list = ['param', 'return', 'type', 'enum']
86 type_checked_jsdoc_tags_or = '|'.join(type_checked_jsdoc_tags_list) 86 type_checked_jsdoc_tags_or = '|'.join(type_checked_jsdoc_tags_list)
87 87
88 # Basic regex for invalid JsDoc types: an object type name ([A-Z][A-Za-z0-9.]+[A -Za-z0-9]) not preceded by '!', '?', ':' (this, new), or '.' (object property). 88 # Basic regex for invalid JsDoc types: an object type name ([A-Z][A-Za-z0-9.]+[A -Za-z0-9]) not preceded by '!', '?', ':' (this, new), or '.' (object property).
89 invalid_type_regex = re.compile(r'@(?:' + type_checked_jsdoc_tags_or + r')\s*\{. *(?<![!?:.A-Za-z0-9])([A-Z][A-Za-z0-9.]+[A-Za-z0-9])[^/]*\}') 89 invalid_type_regex = re.compile(r'@(?:' + type_checked_jsdoc_tags_or + r')\s*\{. *(?<![!?:.A-Za-z0-9])([A-Z][A-Za-z0-9.]+[A-Za-z0-9])[^/]*\}')
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject edScriptOut if validateInjectedScriptOut else '<empty>') 502 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject edScriptOut if validateInjectedScriptOut else '<empty>')
503 errors_found |= hasErrors(validateInjectedScriptOut) 503 errors_found |= hasErrors(validateInjectedScriptOut)
504 504
505 if errors_found: 505 if errors_found:
506 print 'ERRORS DETECTED' 506 print 'ERRORS DETECTED'
507 507
508 os.remove(injectedScriptSourceTmpFile) 508 os.remove(injectedScriptSourceTmpFile)
509 os.remove(compiler_args_file.name) 509 os.remove(compiler_args_file.name)
510 os.remove(protocol_externs_file) 510 os.remove(protocol_externs_file)
511 shutil.rmtree(modules_dir, True) 511 shutil.rmtree(modules_dir, True)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698