mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #8171 - Ms2ger:reflector, r=jdm
Remove the default implementation of Reflectable::init_reflector. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8171) <!-- Reviewable:end -->
This commit is contained in:
commit
354e75a447
2 changed files with 3 additions and 6 deletions
|
@ -196,10 +196,9 @@ impl<'a> GlobalRef<'a> {
|
|||
GlobalRef::Worker(worker) => worker.set_devtools_wants_updates(send_updates),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Reflectable for GlobalRef<'a> {
|
||||
fn reflector(&self) -> &Reflector {
|
||||
/// Returns the receiver's reflector.
|
||||
pub fn reflector(&self) -> &Reflector {
|
||||
match *self {
|
||||
GlobalRef::Window(ref window) => window.reflector(),
|
||||
GlobalRef::Worker(ref worker) => worker.reflector(),
|
||||
|
|
|
@ -418,9 +418,7 @@ pub trait Reflectable {
|
|||
/// Returns the receiver's reflector.
|
||||
fn reflector(&self) -> &Reflector;
|
||||
/// Initializes the Reflector
|
||||
fn init_reflector(&mut self, _obj: *mut JSObject) {
|
||||
panic!("Cannot call init on this Reflectable");
|
||||
}
|
||||
fn init_reflector(&mut self, obj: *mut JSObject);
|
||||
}
|
||||
|
||||
/// Create the reflector for a new DOM object and yield ownership to the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue