mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #14653 - upsuper:bug1321176, r=Manishearth
stylo: Fix assertion for unresolvable url <!-- Please describe your changes on the following line: --> This is the Servo part of [bug 1321176](https://bugzilla.mozilla.org/show_bug.cgi?id=1321176), which has been reviewed by @emilio, @Manishearth, and @heycam. r? @Manishearth --- <!-- 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 - [ ] 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. --> <!-- 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/14653) <!-- Reviewable:end -->
This commit is contained in:
commit
ae2b74e1c9
5 changed files with 25 additions and 12 deletions
|
@ -1152,7 +1152,10 @@ fn static_assert() {
|
|||
Either::Second(_none) => debug_assert!(self.gecko.mBinding.mRawPtr.is_null()),
|
||||
Either::First(ref url) => {
|
||||
let extra_data = url.extra_data();
|
||||
let (ptr, len) = url.as_slice_components();
|
||||
let (ptr, len) = match url.as_slice_components() {
|
||||
Ok(value) => value,
|
||||
Err(_) => (ptr::null(), 0),
|
||||
};
|
||||
unsafe {
|
||||
Gecko_SetMozBinding(&mut self.gecko,
|
||||
ptr,
|
||||
|
@ -1737,7 +1740,9 @@ fn static_assert() {
|
|||
}
|
||||
}
|
||||
Either::First(ref url) => {
|
||||
let (ptr, len) = url.as_slice_components();
|
||||
let (ptr, len) = match url.as_slice_components() {
|
||||
Ok(value) | Err(value) => value
|
||||
};
|
||||
let extra_data = url.extra_data();
|
||||
unsafe {
|
||||
Gecko_SetListStyleImage(&mut self.gecko,
|
||||
|
@ -2433,7 +2438,9 @@ clip-path
|
|||
for i in 0..v.images.len() {
|
||||
let image = &v.images[i];
|
||||
let extra_data = image.url.extra_data();
|
||||
let (ptr, len) = image.url.as_slice_components();
|
||||
let (ptr, len) = match image.url.as_slice_components() {
|
||||
Ok(value) | Err(value) => value,
|
||||
};
|
||||
unsafe {
|
||||
Gecko_SetCursorImage(&mut self.gecko.mCursorImages[i],
|
||||
ptr, len as u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue