diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-01 12:21:47 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-01 20:38:04 +0100 |
commit | 6077ed0ce8eceff97284657d3ae90ec08c9da810 (patch) | |
tree | 5dcb662e3476550c9242b94e79bfb9becb340f78 /components/script/dom/bindings | |
parent | d09d245ee1c0d6e095a29327555940f1256fc1e4 (diff) | |
download | servo-6077ed0ce8eceff97284657d3ae90ec08c9da810.tar.gz servo-6077ed0ce8eceff97284657d3ae90ec08c9da810.zip |
Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency.
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r-- | components/script/dom/bindings/callback.rs | 2 | ||||
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 4 | ||||
-rw-r--r-- | components/script/dom/bindings/global.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs index 56690bcfd41..bd6cf907220 100644 --- a/components/script/dom/bindings/callback.rs +++ b/components/script/dom/bindings/callback.rs @@ -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 diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 127e8615b1d..5ade3e8b683 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -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]) diff --git a/components/script/dom/bindings/global.rs b/components/script/dom/bindings/global.rs index 7fa9ba6c05c..8079c796094 100644 --- a/components/script/dom/bindings/global.rs +++ b/components/script/dom/bindings/global.rs @@ -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()), |