mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
GlobalRef passed by value in reflect_dom_object, reflect_node #4165
This commit is contained in:
parent
661144d285
commit
582ba9d796
3 changed files with 4 additions and 4 deletions
|
@ -340,9 +340,9 @@ pub trait Reflectable {
|
|||
pub fn reflect_dom_object<T: Reflectable>
|
||||
(obj: Box<T>,
|
||||
global: GlobalRef,
|
||||
wrap_fn: extern "Rust" fn(*mut JSContext, &GlobalRef, Box<T>) -> Temporary<T>)
|
||||
wrap_fn: extern "Rust" fn(*mut JSContext, GlobalRef, Box<T>) -> Temporary<T>)
|
||||
-> Temporary<T> {
|
||||
wrap_fn(global.get_cx(), &global, obj)
|
||||
wrap_fn(global.get_cx(), global, obj)
|
||||
}
|
||||
|
||||
/// A struct to store a reference to the reflector of a DOM object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue