aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-01-12 18:32:37 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-01-12 18:32:37 +0530
commit53c4a782a0906c487139d4b6f3c62d9eca3f9f17 (patch)
tree4aa4d1443868a683b8d7898dbedf535e1a727f66 /components/script/dom/testbinding.rs
parent6b1e73c1c0cf3fe2c935df0de667145bc6130461 (diff)
parentce6075825d9e21b9b59d7d7230268745c087d617 (diff)
downloadservo-53c4a782a0906c487139d4b6f3c62d9eca3f9f17.tar.gz
servo-53c4a782a0906c487139d4b6f3c62d9eca3f9f17.zip
Auto merge of #9255 - ckimes89:remove-globalfield, r=nox
Remove global fields from DOM objects Fixes #9227 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9255) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index bc969d69ffd..ba57bce3bf1 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -10,10 +10,10 @@ use dom::bindings::codegen::Bindings::TestBindingBinding::{self, TestBindingMeth
use dom::bindings::codegen::UnionTypes::{BlobOrString, EventOrString};
use dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong};
use dom::bindings::error::Fallible;
-use dom::bindings::global::{GlobalRef, global_root_from_reflector};
+use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
+use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::str::{ByteString, USVString};
use dom::bindings::weakref::MutableWeakRef;
use dom::blob::Blob;
@@ -85,7 +85,7 @@ impl TestBindingMethods for TestBinding {
fn EnumAttribute(&self) -> TestEnum { TestEnum::_empty }
fn SetEnumAttribute(&self, _: TestEnum) {}
fn InterfaceAttribute(&self) -> Root<Blob> {
- Blob::new(global_root_from_reflector(self).r(), Vec::new(), "")
+ Blob::new(self.global().r(), Vec::new(), "")
}
fn SetInterfaceAttribute(&self, _: &Blob) {}
fn UnionAttribute(&self) -> HTMLElementOrLong { HTMLElementOrLong::eLong(0) }
@@ -143,7 +143,7 @@ impl TestBindingMethods for TestBinding {
fn SetAttr_to_automatically_rename(&self, _: DOMString) {}
fn GetEnumAttributeNullable(&self) -> Option<TestEnum> { Some(TestEnum::_empty) }
fn GetInterfaceAttributeNullable(&self) -> Option<Root<Blob>> {
- Some(Blob::new(global_root_from_reflector(self).r(), Vec::new(), ""))
+ Some(Blob::new(self.global().r(), Vec::new(), ""))
}
fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {}
fn GetInterfaceAttributeWeak(&self) -> Option<Root<URL>> {
@@ -182,7 +182,7 @@ impl TestBindingMethods for TestBinding {
fn ReceiveByteString(&self) -> ByteString { ByteString::new(vec!()) }
fn ReceiveEnum(&self) -> TestEnum { TestEnum::_empty }
fn ReceiveInterface(&self) -> Root<Blob> {
- Blob::new(global_root_from_reflector(self).r(), Vec::new(), "")
+ Blob::new(self.global().r(), Vec::new(), "")
}
fn ReceiveAny(&self, _: *mut JSContext) -> JSVal { NullValue() }
fn ReceiveObject(&self, _: *mut JSContext) -> *mut JSObject { panic!() }
@@ -207,7 +207,7 @@ impl TestBindingMethods for TestBinding {
fn ReceiveNullableByteString(&self) -> Option<ByteString> { Some(ByteString::new(vec!())) }
fn ReceiveNullableEnum(&self) -> Option<TestEnum> { Some(TestEnum::_empty) }
fn ReceiveNullableInterface(&self) -> Option<Root<Blob>> {
- Some(Blob::new(global_root_from_reflector(self).r(), Vec::new(), ""))
+ Some(Blob::new(self.global().r(), Vec::new(), ""))
}
fn ReceiveNullableObject(&self, _: *mut JSContext) -> *mut JSObject { ptr::null_mut() }
fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> {