mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency.
This commit is contained in:
parent
d09d245ee1
commit
6077ed0ce8
9 changed files with 23 additions and 23 deletions
|
@ -147,7 +147,7 @@ impl CallSetup {
|
|||
pub fn new<T: CallbackContainer>(callback: T, handling: ExceptionHandling) -> CallSetup {
|
||||
let global = global_object_for_js_object(callback.callback());
|
||||
let global = global.root();
|
||||
let cx = global.root_ref().get_cx();
|
||||
let cx = global.r().get_cx();
|
||||
CallSetup {
|
||||
cx: cx,
|
||||
_handling: handling
|
||||
|
|
|
@ -2222,7 +2222,7 @@ class CGCallGenerator(CGThing):
|
|||
" Ok(result) => result,\n"
|
||||
" Err(e) => {\n"
|
||||
"%s"
|
||||
" throw_dom_exception(cx, global.root_ref(), e);\n"
|
||||
" throw_dom_exception(cx, global.r(), e);\n"
|
||||
" return%s;\n"
|
||||
" },\n"
|
||||
"};" % (glob, errorResult)))
|
||||
|
@ -4014,7 +4014,7 @@ let global = global_object_for_js_object(JS_CALLEE(cx, vp).to_object());
|
|||
let global = global.root();
|
||||
""")
|
||||
nativeName = MakeNativeName(self._ctor.identifier.name)
|
||||
callGenerator = CGMethodCall(["&global.root_ref()"], nativeName, True,
|
||||
callGenerator = CGMethodCall(["&global.r()"], nativeName, True,
|
||||
self.descriptor, self._ctor)
|
||||
return CGList([preamble, callGenerator])
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ impl<'a> Reflectable for GlobalRef<'a> {
|
|||
impl GlobalRoot {
|
||||
/// Obtain a safe reference to the global object that cannot outlive the
|
||||
/// lifetime of this root.
|
||||
pub fn root_ref<'c>(&'c self) -> GlobalRef<'c> {
|
||||
pub fn r<'c>(&'c self) -> GlobalRef<'c> {
|
||||
match *self {
|
||||
GlobalRoot::Window(ref window) => GlobalRef::Window(window.r()),
|
||||
GlobalRoot::Worker(ref worker) => GlobalRef::Worker(worker.r()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue