Skip to content

Commit

Permalink
Auto merge of #20310 - fabricedesre:opt-multiprocess, r=jdm
Browse files Browse the repository at this point in the history
Update the MULTIPROCESS static when changing default options

<!-- Please describe your changes on the following line: -->
When the options are set not from the command line but by calling `set_defaults()` which is common for embedders, the MULTIPROCESS static is not set, and so the setting is ignored. This patch fixes that.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because we have no tests around that.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

<!-- 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/20310)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Mar 16, 2018
2 parents 57b12aa + e268a43 commit b93f153
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/config/opts.rs
Expand Up @@ -911,6 +911,9 @@ lazy_static! {
}

pub fn set_defaults(opts: Opts) {
// Set the static to the new default value.
MULTIPROCESS.store(opts.multiprocess, Ordering::SeqCst);

unsafe {
assert!(DEFAULT_OPTIONS.is_null());
assert_ne!(DEFAULT_OPTIONS, INVALID_OPTIONS);
Expand Down

0 comments on commit b93f153

Please sign in to comment.