net: Make most of the resource task messages serializable.

This commit is contained in:
Patrick Walton 2015-07-09 16:18:38 -07:00
parent 7e77285745
commit 9c9d7dc93b
15 changed files with 373 additions and 105 deletions

View file

@ -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(()))));
});
}