Rename some local variables and shorten some lines.

This was done manually, and might benefit from a more careful review.
This commit is contained in:
Bobby Holley 2013-10-09 09:53:23 +02:00
parent 622aa76515
commit 549ac6a29b
11 changed files with 25 additions and 40 deletions

View file

@ -162,9 +162,7 @@ impl BindingObject for AbstractDocument {
impl DerivedWrapper for AbstractDocument {
#[fixed_stack_segment]
fn wrap(&mut self, _cx: *JSContext, _scope: *JSObject, vp: *mut JSVal) -> i32 {
let cache = self.reflector();
let wrapper = cache.get_jsobject();
unsafe { *vp = RUST_OBJECT_TO_JSVAL(wrapper) };
unsafe { *vp = RUST_OBJECT_TO_JSVAL(self.reflector().get_jsobject()) };
return 1;
}
@ -229,9 +227,7 @@ impl Document {
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
let win = self.window.get_ref();
let cx = win.page.js_info.get_ref().js_compartment.cx.ptr;
let cache = win.reflector();
let scope = cache.get_jsobject();
(scope, cx)
(win.reflector().get_jsobject(), cx)
}
pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection {