mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
<!-- Please describe your changes on the following line: --> r? @jdm issue https://github.com/servo/servo/issues/15252 The primary goal of this PR is to add add a generic trait method that returns a void ptr. In addition to that change, I made the casting explicit in `components/script/dom/bindings/callback.rs` and `components/script/dom/promise.rs`. I did not use the new trait method because `AddRawValueRoot` is not looking for a `c_void`. It's looking for `std::os::raw::c_char`. ```rust pub fn AddRawValueRoot(cx: *mut JSContext, vp: *mut Value, name: *const ::std::os::raw::c_char) -> bool; ``` So I replace the `as *const _ ` with a more specific cast. --- <!-- 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 #15252 <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because This seems like code cleanup. It shouldn't change behaviour. <!-- 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. --> Source-Repo: https://github.com/servo/servo Source-Revision: 8d8fea0b4bf323be42eff3ad5624ce33892fb6df --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : d5992625f30523ee372f54d0005b211d6c9a6b41 |
||
|---|---|---|
| .. | ||
| parser | ||
| ply | ||
| api.html.template | ||
| apis.html.template | ||
| BindingGen.py | ||
| Bindings.conf | ||
| CodegenRust.py | ||
| Configuration.py | ||
| GlobalGen.py | ||
| interface.html.template | ||
| property.html.template | ||
| pythonpath.py | ||