mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Do not root XMLHttpRequest::upload
This commit is contained in:
parent
d28de59e4a
commit
6dc42dd1d6
1 changed files with 2 additions and 4 deletions
|
@ -493,8 +493,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
||||||
|
|
||||||
if !self.sync.get() {
|
if !self.sync.get() {
|
||||||
// Step 8
|
// Step 8
|
||||||
let upload_target = self.upload.root();
|
let event_target = EventTargetCast::from_ref(&*self.upload);
|
||||||
let event_target = EventTargetCast::from_ref(upload_target.r());
|
|
||||||
if event_target.has_handlers() {
|
if event_target.has_handlers() {
|
||||||
self.upload_events.set(true);
|
self.upload_events.set(true);
|
||||||
}
|
}
|
||||||
|
@ -917,13 +916,12 @@ impl XMLHttpRequest {
|
||||||
|
|
||||||
fn dispatch_progress_event(&self, upload: bool, type_: DOMString, loaded: u64, total: Option<u64>) {
|
fn dispatch_progress_event(&self, upload: bool, type_: DOMString, loaded: u64, total: Option<u64>) {
|
||||||
let global = self.global.root();
|
let global = self.global.root();
|
||||||
let upload_target = self.upload.root();
|
|
||||||
let progressevent = ProgressEvent::new(global.r(),
|
let progressevent = ProgressEvent::new(global.r(),
|
||||||
type_, EventBubbles::DoesNotBubble, EventCancelable::NotCancelable,
|
type_, EventBubbles::DoesNotBubble, EventCancelable::NotCancelable,
|
||||||
total.is_some(), loaded,
|
total.is_some(), loaded,
|
||||||
total.unwrap_or(0));
|
total.unwrap_or(0));
|
||||||
let target = if upload {
|
let target = if upload {
|
||||||
EventTargetCast::from_ref(upload_target.r())
|
EventTargetCast::from_ref(&*self.upload)
|
||||||
} else {
|
} else {
|
||||||
EventTargetCast::from_ref(self)
|
EventTargetCast::from_ref(self)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue