aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/textdecoder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/textdecoder.rs')
-rw-r--r--components/script/dom/textdecoder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs
index fae78342a73..db18d9a5be4 100644
--- a/components/script/dom/textdecoder.rs
+++ b/components/script/dom/textdecoder.rs
@@ -6,10 +6,10 @@ use dom::bindings::codegen::Bindings::TextDecoderBinding;
use dom::bindings::codegen::Bindings::TextDecoderBinding::TextDecoderMethods;
use dom::bindings::conversions::array_buffer_view_data;
use dom::bindings::error::{Error, Fallible};
-use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::bindings::str::{DOMString, USVString};
+use dom::globalscope::GlobalScope;
use encoding::label::encoding_from_whatwg_label;
use encoding::types::{DecoderTrap, EncodingRef};
use js::jsapi::{JSContext, JSObject};
@@ -36,14 +36,14 @@ impl TextDecoder {
Err(Error::Range("The given encoding is not supported.".to_owned()))
}
- pub fn new(global: GlobalRef, encoding: EncodingRef, fatal: bool) -> Root<TextDecoder> {
+ pub fn new(global: &GlobalScope, encoding: EncodingRef, fatal: bool) -> Root<TextDecoder> {
reflect_dom_object(box TextDecoder::new_inherited(encoding, fatal),
global,
TextDecoderBinding::Wrap)
}
/// https://encoding.spec.whatwg.org/#dom-textdecoder
- pub fn Constructor(global: GlobalRef,
+ pub fn Constructor(global: &GlobalScope,
label: DOMString,
options: &TextDecoderBinding::TextDecoderOptions)
-> Fallible<Root<TextDecoder>> {