mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
auto merge of #3666 : ttaubert/servo/issue/3644-privatize-dom, r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field. All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.
This commit is contained in:
commit
f350879574
131 changed files with 803 additions and 381 deletions
|
@ -5452,7 +5452,7 @@ class GlobalGenRoots():
|
|||
protoDescriptor = config.getDescriptor(protoName)
|
||||
delegate = string.Template('''impl ${selfName} for ${baseName} {
|
||||
fn ${fname}(&self) -> bool {
|
||||
self.${parentName}.${fname}()
|
||||
self.${parentName}().${fname}()
|
||||
}
|
||||
}
|
||||
''').substitute({'fname': 'is_' + name.lower(),
|
||||
|
|
|
@ -83,7 +83,7 @@ impl<'a> GlobalRef<'a> {
|
|||
/// thread.
|
||||
pub fn script_chan<'b>(&'b self) -> &'b ScriptChan {
|
||||
match *self {
|
||||
Window(ref window) => &window.script_chan,
|
||||
Window(ref window) => window.script_chan(),
|
||||
Worker(ref worker) => worker.script_chan(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -660,7 +660,7 @@ pub extern fn outerize_global(_cx: *mut JSContext, obj: JSHandleObject) -> *mut
|
|||
IDLInterface::get_prototype_depth(None::<window::Window>))
|
||||
.unwrap()
|
||||
.root();
|
||||
win.browser_context.borrow().as_ref().unwrap().window_proxy()
|
||||
win.browser_context().as_ref().unwrap().window_proxy()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue