diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-11-06 02:30:12 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-11-06 06:37:44 +0530 |
commit | 52983ed97cb76691c09efe807b449f70a0cc0a7b (patch) | |
tree | c01439ee1f49f132af3270c69e0fc0221dd168a9 | |
parent | 4a8af307d19d97d507a4059fc527bbd7133f4dd9 (diff) | |
download | servo-52983ed97cb76691c09efe807b449f70a0cc0a7b.tar.gz servo-52983ed97cb76691c09efe807b449f70a0cc0a7b.zip |
Silence lint for self.global in XHR
-rw-r--r-- | components/plugins/lints.rs | 2 | ||||
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/components/plugins/lints.rs b/components/plugins/lints.rs index 61394651b1f..aa374cde1d9 100644 --- a/components/plugins/lints.rs +++ b/components/plugins/lints.rs @@ -160,7 +160,7 @@ impl LintPass for UnrootedPass { ast::ExprAssign(_, ref e) | // Match statements allow you to bind onto the variable later in an arm // We need not check arms individually since enum/struct fields are already - // linted in `check_struct_def` and `check_variant ` + // linted in `check_struct_def` and `check_variant` // (so there is no way of destructuring out a `#[must_root]` field) ast::ExprMatch(ref e, _) | // For loops allow you to bind a return value locally diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 3ad488253b0..869820e0ca6 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -13,7 +13,7 @@ use dom::bindings::codegen::InheritTypes::{EventCast, EventTargetCast, XMLHttpRe use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::error::{Error, ErrorResult, Fallible, InvalidState, InvalidAccess}; use dom::bindings::error::{Network, Syntax, Security, Abort, Timeout}; -use dom::bindings::global::{GlobalField, GlobalRef, WorkerField}; +use dom::bindings::global::{GlobalField, GlobalRef, WorkerRoot}; use dom::bindings::js::{MutNullableJS, JS, JSRef, Temporary, OptionalRootedRootable}; use dom::bindings::str::ByteString; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; @@ -698,8 +698,8 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> { self.response_type.get() } fn SetResponseType(self, response_type: XMLHttpRequestResponseType) -> ErrorResult { - match self.global { - WorkerField(_) if response_type == XMLHttpRequestResponseTypeValues::Document + match self.global.root() { + WorkerRoot(_) if response_type == XMLHttpRequestResponseTypeValues::Document => return Ok(()), _ => {} } |