Fix cef to follow new Browser::new() interface#17548
Conversation
| use std::rc::Rc; | ||
| use std::sync::atomic::{AtomicIsize, Ordering}; | ||
| use std::thread; | ||
|
|
There was a problem hiding this comment.
No need to remove this line.
There was a problem hiding this comment.
sorry, that was an oversight, i'll fix it
ports/cef/browser.rs
Outdated
| let target_url = match url_string { | ||
| Some(val) => ServoUrl::parse(&val[..]).unwrap_or(blank_url), | ||
| None => blank_url | ||
| }; |
There was a problem hiding this comment.
Could you do something like this:
let target_url = url_string
.and_then(|val| ServoUrl::parse(&val[..]).ok())
.or(ServoUrl::parse("about:blank").ok())
.unwrap();There was a problem hiding this comment.
I think &val[..] here can be simplified to &val as well.
(with passing of ServoUrl) Review changes
|
@paulrouget fixed according to your review comments. |
|
so |
|
I'm pretty sure the error while linking is caused by travis running out of disk space. |
|
Can that error be ignored then? Or is there a fix that I can do? |
|
It can be ignored. |
|
@bors-servo: delegate=paul |
|
✌️ @paul can now approve this pull request |
|
@bors-servo delegate=paulrouget |
|
✌️ @paulrouget can now approve this pull request |
|
@bors-servo r+ |
|
📌 Commit 185aa20 has been approved by |
Fix cef to follow new Browser::new() interface Changes the call to `Browser::new()` in cef to contain the target_url. cc @paulrouget <!-- 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: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17273. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/17548) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
Changes the call to
Browser::new()in cef to contain the target_url.cc @paulrouget
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is