mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Updated reflect_dom_object to be passed by value
This commit is contained in:
parent
9cea3ce266
commit
2cbf5a3671
51 changed files with 75 additions and 75 deletions
|
@ -441,10 +441,10 @@ pub trait Reflectable {
|
|||
/// reflector.
|
||||
pub fn reflect_dom_object<T: Reflectable>
|
||||
(obj: Box<T>,
|
||||
global: &GlobalRef,
|
||||
global: GlobalRef,
|
||||
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