mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
This commit is contained in:
parent
c9f26dfd59
commit
1dad710063
61 changed files with 479 additions and 471 deletions
|
@ -2199,7 +2199,7 @@ class CGCallGenerator(CGThing):
|
|||
if static:
|
||||
call = CGWrapper(call, pre="%s::" % descriptorProvider.interface.identifier.name)
|
||||
else:
|
||||
call = CGWrapper(call, pre="%s." % object)
|
||||
call = CGWrapper(call, pre="%s.r()." % object)
|
||||
call = CGList([call, CGWrapper(args, pre="(", post=")")])
|
||||
|
||||
self.cgRoot.append(CGList([
|
||||
|
@ -2214,7 +2214,7 @@ class CGCallGenerator(CGThing):
|
|||
if static:
|
||||
glob = ""
|
||||
else:
|
||||
glob = " let global = global_object_for_js_object(this.reflector().get_jsobject());\n"\
|
||||
glob = " let global = global_object_for_js_object(this.r().reflector().get_jsobject());\n"\
|
||||
" let global = global.root();\n"
|
||||
|
||||
self.cgRoot.append(CGGeneric(
|
||||
|
|
|
@ -473,7 +473,7 @@ impl<T: Reflectable+IDLInterface> FromJSValConvertible<()> for JS<T> {
|
|||
|
||||
impl<T: Reflectable> ToJSValConvertible for Root<T> {
|
||||
fn to_jsval(&self, cx: *mut JSContext) -> JSVal {
|
||||
self.reflector().to_jsval(cx)
|
||||
self.r().reflector().to_jsval(cx)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ pub extern fn outerize_global(_cx: *mut JSContext, obj: JSHandleObject) -> *mut
|
|||
debug!("outerizing");
|
||||
let obj = *obj.unnamed_field1;
|
||||
let win: Root<window::Window> = unwrap_jsmanaged(obj).unwrap().root();
|
||||
win.browser_context().as_ref().unwrap().window_proxy()
|
||||
win.r().browser_context().as_ref().unwrap().window_proxy()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue