mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
This commit is contained in:
parent
9fd6f0acd5
commit
b372e7c98f
28 changed files with 274 additions and 226 deletions
|
@ -85,8 +85,8 @@ impl ImageDataMethods for ImageData {
|
|||
|
||||
#[allow(unsafe_code)]
|
||||
// https://html.spec.whatwg.org/multipage/#dom-imagedata-data
|
||||
fn Data(&self, _: *mut JSContext) -> NonZero<*mut JSObject> {
|
||||
unsafe fn Data(&self, _: *mut JSContext) -> NonZero<*mut JSObject> {
|
||||
assert!(!self.data.get().is_null());
|
||||
unsafe { NonZero::new(self.data.get()) }
|
||||
NonZero::new(self.data.get())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue