servo: Merge #9753 - Make Fetch Protocol Asynchronous (from nikkisquared:async_fetch); r=jdm

I'm working on making it possible to run Fetch Asynchronously, as required for some steps, such as Main Fetch. It looks like somebody has already laid some groundwork for that, with a AsyncFetchListener trait and two async fetch functions defined, which I'm building on top of.

So far, as a sort of proof of concept, I've written a test to asynchronously retrieve a fetch response, which uses a simple function to check if the fetch response is complete or not. I'd like to be checked if I'm on the right path, to see if I need to rework anything so far, and what my next step can be.

Source-Repo: https://github.com/servo/servo
Source-Revision: 22ce878edc22360af7391694efc9e5668116d3fb
This commit is contained in:
Nikki
2016-03-02 01:19:29 +05:00
parent b32760d83d
commit 7d279d0bfb
5 changed files with 264 additions and 169 deletions

View File

@@ -111,7 +111,7 @@ pub enum CORSSettings {
pub struct Request {
pub method: RefCell<Method>,
pub local_urls_only: bool,
pub sanboxed_storage_area_urls: bool,
pub sandboxed_storage_area_urls: bool,
pub headers: RefCell<Headers>,
pub unsafe_request: bool,
pub body: RefCell<Option<Vec<u8>>>,
@@ -155,7 +155,7 @@ impl Request {
Request {
method: RefCell::new(Method::Get),
local_urls_only: false,
sanboxed_storage_area_urls: false,
sandboxed_storage_area_urls: false,
headers: RefCell::new(Headers::new()),
unsafe_request: false,
body: RefCell::new(None),
@@ -193,7 +193,7 @@ impl Request {
Request {
method: RefCell::new(Method::Get),
local_urls_only: false,
sanboxed_storage_area_urls: false,
sandboxed_storage_area_urls: false,
headers: RefCell::new(Headers::new()),
unsafe_request: false,
body: RefCell::new(None),