mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make DomRoot<T> a type alias of a more general Root<T> type
This Root<T> relies on the concept of a stable trace object, which doesn't move for the whole lifetime of the T value. For safety reasons, T must be 'static. The only implementor of StableTraceObject for now is Dom<T>.
This commit is contained in:
parent
7574d26476
commit
dee38475b8
2 changed files with 108 additions and 60 deletions
|
@ -72,7 +72,7 @@ impl Reflector {
|
|||
}
|
||||
|
||||
/// A trait to provide access to the `Reflector` for a DOM object.
|
||||
pub trait DomObject {
|
||||
pub trait DomObject: 'static {
|
||||
/// Returns the receiver's reflector.
|
||||
fn reflector(&self) -> &Reflector;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue