mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass a String to spawn_named.
IntoString has been removed from Rust, and named() will take a String, so there is no good reason to do otherwise here.
This commit is contained in:
parent
94ebc7c32d
commit
808315926c
15 changed files with 36 additions and 25 deletions
|
@ -257,7 +257,7 @@ impl XMLHttpRequest {
|
|||
let req2 = req.clone();
|
||||
// TODO: this exists only to make preflight check non-blocking
|
||||
// perhaps should be handled by the resource_loader?
|
||||
spawn_named("XHR:Cors", proc() {
|
||||
spawn_named("XHR:Cors".to_owned(), proc() {
|
||||
let response = req2.http_fetch();
|
||||
chan.send(response);
|
||||
});
|
||||
|
@ -624,7 +624,7 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
|
|||
// inflight events queued up in the script task's port.
|
||||
let addr = Trusted::new(self.global.root().r().get_cx(), self,
|
||||
script_chan.clone());
|
||||
spawn_named("XHRTask", proc() {
|
||||
spawn_named("XHRTask".to_owned(), proc() {
|
||||
let _ = XMLHttpRequest::fetch(&mut SyncOrAsync::Async(addr, script_chan),
|
||||
resource_task,
|
||||
load_data,
|
||||
|
@ -936,7 +936,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
|
|||
let oneshot = self.timer.borrow_mut()
|
||||
.oneshot(Duration::milliseconds(timeout as i64));
|
||||
let terminate_sender = (*self.terminate_sender.borrow()).clone();
|
||||
spawn_named("XHR:Timer", proc () {
|
||||
spawn_named("XHR:Timer".to_owned(), proc () {
|
||||
match oneshot.recv_opt() {
|
||||
Ok(_) => {
|
||||
terminate_sender.map(|s| s.send_opt(TerminateReason::TimedOut));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue