mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Cleanups for future script crate split (#35987)
* script: Avoid direct impl blocks on generated dicts and unions. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Remove references to codegen-specific import module. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix tidy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
3ecd1c0699
commit
d35da38a2f
43 changed files with 211 additions and 146 deletions
|
@ -39,8 +39,7 @@ use js::typedarray::{
|
|||
TypedArray, TypedArrayElement, TypedArrayElementCreator,
|
||||
};
|
||||
|
||||
use crate::dom::bindings::error::Error;
|
||||
use crate::dom::bindings::import::module::Fallible;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
#[cfg(feature = "webgpu")]
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
|
|
@ -36,7 +36,7 @@ macro_rules! native_raw_obj_fn {
|
|||
#[allow(clippy::macro_metavars_in_unsafe)]
|
||||
unsafe {
|
||||
let name: &std::ffi::CStr = $name;
|
||||
let raw_fun = $crate::dom::bindings::import::module::jsapi::JS_NewFunction(
|
||||
let raw_fun = js::jsapi::JS_NewFunction(
|
||||
*$cx,
|
||||
Some(wrapper),
|
||||
$nargs,
|
||||
|
@ -44,7 +44,7 @@ macro_rules! native_raw_obj_fn {
|
|||
name.as_ptr() as *const std::ffi::c_char,
|
||||
);
|
||||
assert!(!raw_fun.is_null());
|
||||
$crate::dom::bindings::import::module::jsapi::JS_GetFunctionObject(raw_fun)
|
||||
js::jsapi::JS_GetFunctionObject(raw_fun)
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue