mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
net: Make most of the resource task messages serializable.
This commit is contained in:
parent
7e77285745
commit
9c9d7dc93b
15 changed files with 373 additions and 105 deletions
|
@ -12,6 +12,7 @@
|
|||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use script_task::ScriptChan;
|
||||
use net_traits::{AsyncResponseTarget, AsyncResponseListener, ResponseAction, Metadata};
|
||||
use net_traits::{SerializableStringResult};
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -144,7 +145,8 @@ impl CORSRequest {
|
|||
let mut context = listener.context.lock();
|
||||
let context = context.as_mut().unwrap();
|
||||
*context.response.borrow_mut() = Some(response);
|
||||
listener.invoke_with_listener(ResponseAction::ResponseComplete(Ok(())));
|
||||
listener.invoke_with_listener(ResponseAction::ResponseComplete(
|
||||
SerializableStringResult(Ok(()))));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue