mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use safe JSContext when possible in interface.rs
This commit is contained in:
parent
8b070fef52
commit
78034a90d0
6 changed files with 194 additions and 176 deletions
|
@ -6,7 +6,8 @@
|
|||
|
||||
use crate::dom::bindings::guard::Guard;
|
||||
use crate::dom::bindings::interface::{create_object, define_on_global_object};
|
||||
use js::jsapi::{JSClass, JSContext, JSFunctionSpec};
|
||||
use crate::script_runtime::JSContext;
|
||||
use js::jsapi::{JSClass, JSFunctionSpec};
|
||||
use js::rust::{HandleObject, MutableHandleObject};
|
||||
|
||||
/// The class of a namespace object.
|
||||
|
@ -28,8 +29,8 @@ impl NamespaceObjectClass {
|
|||
}
|
||||
|
||||
/// Create a new namespace object.
|
||||
pub unsafe fn create_namespace_object(
|
||||
cx: *mut JSContext,
|
||||
pub fn create_namespace_object(
|
||||
cx: JSContext,
|
||||
global: HandleObject,
|
||||
proto: HandleObject,
|
||||
class: &'static NamespaceObjectClass,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue