| Index: third_party/WebKit/Source/devtools/scripts/compile_frontend.py
|
| diff --git a/third_party/WebKit/Source/devtools/scripts/compile_frontend.py b/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
|
| index afc56679eec363850e892b14eb82d0959119b04a..911570de6a138541443c588f1830dc94f8edcfa9 100755
|
| --- a/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
|
| +++ b/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
|
| @@ -38,6 +38,8 @@ import tempfile
|
| from build import modular_build
|
| from build import generate_protocol_externs
|
|
|
| +import utils
|
| +
|
| try:
|
| import simplejson as json
|
| except ImportError:
|
| @@ -97,24 +99,6 @@ errors_found = False
|
| generate_protocol_externs.generate_protocol_externs(protocol_externs_file, path.join(inspector_path, 'browser_protocol.json'), path.join(v8_inspector_path, 'js_protocol.json'))
|
|
|
|
|
| -# Based on http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python.
|
| -def which(program):
|
| - def is_exe(fpath):
|
| - return path.isfile(fpath) and os.access(fpath, os.X_OK)
|
| -
|
| - fpath, fname = path.split(program)
|
| - if fpath:
|
| - if is_exe(program):
|
| - return program
|
| - else:
|
| - for part in os.environ["PATH"].split(os.pathsep):
|
| - part = part.strip('"')
|
| - exe_file = path.join(part, program)
|
| - if is_exe(exe_file):
|
| - return exe_file
|
| - return None
|
| -
|
| -
|
| def log_error(message):
|
| print 'ERROR: ' + message
|
|
|
| @@ -207,9 +191,7 @@ def find_java():
|
| required_minor = 7
|
| exec_command = None
|
| has_server_jvm = True
|
| - java_path = which('java')
|
| - if not java_path:
|
| - java_path = which('java.exe')
|
| + java_path = utils.which('java')
|
|
|
| if not java_path:
|
| print 'NOTE: No Java executable found in $PATH.'
|
|
|