aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-01-07 19:10:38 +0100
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-01-11 17:11:12 +0100
commit1033d6bc0747372c42b7cb42ebac371ae22fd0d5 (patch)
treea6081f3699cece2726814393824bc7b5f518dbd8 /components/script/dom/htmlimageelement.rs
parent9d5499bbfbf23174c6c2a36f024c0e1be3155f27 (diff)
downloadservo-1033d6bc0747372c42b7cb42ebac371ae22fd0d5.tar.gz
servo-1033d6bc0747372c42b7cb42ebac371ae22fd0d5.zip
ImageContext.aborted does not need to be inside a Cell
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r--components/script/dom/htmlimageelement.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 0ca0e6733fa..d11cd2ed4de 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -167,7 +167,7 @@ struct ImageContext {
/// The cache ID for this request.
id: PendingImageId,
/// Used to mark abort
- aborted: Cell<bool>,
+ aborted: bool,
/// The document associated with this request
doc: Trusted<Document>,
/// timing data for this resource
@@ -193,7 +193,7 @@ impl FetchResponseListener for ImageContext {
if let Some(ref content_type) = metadata.content_type {
let mime: Mime = content_type.clone().into_inner().into();
if mime.type_() == mime::MULTIPART && mime.subtype().as_str() == "x-mixed-replace" {
- self.aborted.set(true);
+ self.aborted = true;
}
}
}
@@ -255,7 +255,7 @@ impl ResourceTimingListener for ImageContext {
impl PreInvoke for ImageContext {
fn should_invoke(&self) -> bool {
- !self.aborted.get()
+ !self.aborted
}
}
@@ -301,7 +301,7 @@ impl HTMLImageElement {
image_cache: window.image_cache(),
status: Ok(()),
id: id,
- aborted: Cell::new(false),
+ aborted: false,
doc: Trusted::new(&document),
resource_timing: ResourceFetchTiming::new(ResourceTimingType::Resource),
url: img_url.clone(),