diff options
author | Simon Martin <simartin@users.sourceforge.net> | 2016-06-18 00:15:29 +0200 |
---|---|---|
committer | Simon Martin <simartin@users.sourceforge.net> | 2016-06-18 00:15:29 +0200 |
commit | ec5792ed2af974e4ba0458d2ea57b3d49e6b4138 (patch) | |
tree | d8ebe7e90b434dcfec594f9f932251be569330e5 /python/servo/post_build_commands.py | |
parent | 9208b8e21493b4a7721ff780691ffec193ef8a32 (diff) | |
download | servo-ec5792ed2af974e4ba0458d2ea57b3d49e6b4138.tar.gz servo-ec5792ed2af974e4ba0458d2ea57b3d49e6b4138.zip |
Issue #11388: --debug and --browserhtml are not exclusive in 'mach run'.
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r-- | python/servo/post_build_commands.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 33bbca0f19b..ece3ce584af 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -98,6 +98,25 @@ class PostBuildCommands(CommandBase): args = [self.get_binary_path(release, dev)] + if browserhtml: + browserhtml_path = find_dep_path_newest('browserhtml', args[0]) + if browserhtml_path is None: + print("Could not find browserhtml package; perhaps you haven't built Servo.") + return 1 + + if is_macosx(): + # Enable borderless on OSX + args = args + ['-b'] + elif is_windows(): + # Convert to a relative path to avoid mingw -> Windows path conversions + browserhtml_path = path.relpath(browserhtml_path, os.getcwd()) + + args = args + ['-w', + '--pref', 'dom.mozbrowser.enabled', + '--pref', 'dom.forcetouch.enabled', + '--pref', 'shell.quit-on-escape.enabled=false', + path.join(browserhtml_path, 'out', 'index.html')] + # Borrowed and modified from: # http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/python/mozbuild/mozbuild/mach_commands.py#l883 if debug: @@ -126,25 +145,6 @@ class PostBuildCommands(CommandBase): # Prepend the debugger args. args = ([command] + self.debuggerInfo.args + args + params) - elif browserhtml: - browserhtml_path = find_dep_path_newest('browserhtml', args[0]) - if browserhtml_path is None: - print("Could not find browserhtml package; perhaps you haven't built Servo.") - return 1 - - if is_macosx(): - # Enable borderless on OSX - args = args + ['-b'] - elif is_windows(): - # Convert to a relative path to avoid mingw -> Windows path conversions - browserhtml_path = path.relpath(browserhtml_path, os.getcwd()) - - args = args + ['-w', - '--pref', 'dom.mozbrowser.enabled', - '--pref', 'dom.forcetouch.enabled', - '--pref', 'shell.quit-on-escape.enabled=false', - path.join(browserhtml_path, 'out', 'index.html')] - args = args + params else: args = args + params |