mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
Make NonCallbackInterfaceObjectClass::new unsafe
This commit is contained in:
parent
edb58040c8
commit
a45f117838
2 changed files with 4 additions and 3 deletions
|
@ -1908,9 +1908,10 @@ class CGInterfaceObjectJSClass(CGThing):
|
||||||
"depth": self.descriptor.prototypeDepth
|
"depth": self.descriptor.prototypeDepth
|
||||||
}
|
}
|
||||||
return """\
|
return """\
|
||||||
static InterfaceObjectClass: NonCallbackInterfaceObjectClass =
|
static InterfaceObjectClass: NonCallbackInterfaceObjectClass = unsafe {
|
||||||
NonCallbackInterfaceObjectClass::new(%(constructor)s, %(representation)s,
|
NonCallbackInterfaceObjectClass::new(%(constructor)s, %(representation)s,
|
||||||
PrototypeList::ID::%(id)s, %(depth)s);
|
PrototypeList::ID::%(id)s, %(depth)s)
|
||||||
|
};
|
||||||
""" % args
|
""" % args
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ unsafe impl Sync for NonCallbackInterfaceObjectClass {}
|
||||||
|
|
||||||
impl NonCallbackInterfaceObjectClass {
|
impl NonCallbackInterfaceObjectClass {
|
||||||
/// Create a new `NonCallbackInterfaceObjectClass` structure.
|
/// Create a new `NonCallbackInterfaceObjectClass` structure.
|
||||||
pub const fn new(
|
pub const unsafe fn new(
|
||||||
constructor: ConstructorClassHook,
|
constructor: ConstructorClassHook,
|
||||||
string_rep: &'static [u8],
|
string_rep: &'static [u8],
|
||||||
proto_id: PrototypeList::ID,
|
proto_id: PrototypeList::ID,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue