Use safe JSContext when possible in interface.rs

This commit is contained in:
marmeladema 2019-07-27 18:52:12 +01:00
parent 8b070fef52
commit 78034a90d0
6 changed files with 194 additions and 176 deletions

View file

@ -1090,12 +1090,11 @@ impl TestBinding {
pub fn FuncControlledStaticMethodEnabled(_: &GlobalScope) {}
}
#[allow(unsafe_code)]
impl TestBinding {
pub unsafe fn condition_satisfied(_: *mut JSContext, _: HandleObject) -> bool {
pub fn condition_satisfied(_: SafeJSContext, _: HandleObject) -> bool {
true
}
pub unsafe fn condition_unsatisfied(_: *mut JSContext, _: HandleObject) -> bool {
pub fn condition_unsatisfied(_: SafeJSContext, _: HandleObject) -> bool {
false
}
}