Auto merge of #12708 - paulrouget:multiprocessAndSandboxForBhtml, r=metajack

Enable multiprocess and sandbox

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12705 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Enable multiprocess and sandbox for Mac and Linux when running
browserhtml.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12708)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-04 16:13:45 -05:00 committed by GitHub
commit 3dce4c62ca
2 changed files with 6 additions and 2 deletions

View file

@ -146,7 +146,7 @@ class PackageCommands(CommandBase):
print("Writing run-servo")
bhtml_path = path.join('${0%/*}/../Resources', browserhtml_path.split('/')[-1], 'out', 'index.html')
runservo = os.open(dir_to_app + '/Contents/MacOS/run-servo', os.O_WRONLY | os.O_CREAT, int("0755", 8))
os.write(runservo, '#!/bin/bash\nexec ${0%/*}/servo ' + bhtml_path)
os.write(runservo, '#!/bin/bash\nexec ${0%/*}/servo -M -S ' + bhtml_path)
os.close(runservo)
print("Creating dmg")
@ -220,7 +220,7 @@ class PackageCommands(CommandBase):
delete(dir_to_package + '/build/' + f)
print("Writing runservo.sh")
# TODO: deduplicate this arg list from post_build_commands
servo_args = ['-w', '-b',
servo_args = ['-w', '-b', '-M', '-S'
'--pref', 'dom.mozbrowser.enabled',
'--pref', 'dom.forcetouch.enabled',
'--pref', 'shell.builtin-key-shortcuts.enabled=false',

View file

@ -111,6 +111,10 @@ class PostBuildCommands(CommandBase):
# Convert to a relative path to avoid mingw -> Windows path conversions
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
if not is_windows():
# multiprocess + sandbox
args = args + ['-M', '-S']
args = args + ['-w',
'--pref', 'dom.mozbrowser.enabled',
'--pref', 'dom.forcetouch.enabled',