Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Websocket to RequestMode enum #14895

Merged
merged 1 commit into from Jan 8, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added Websocket to RequestMode enum

set unreachable in dom/request.rs for websocket

fixed imports
  • Loading branch information
Dowon Cha
Dowon Cha committed Jan 8, 2017
commit 8bf924dc79ed143bc4bf34b3c1d7d9ef12e0fa74
@@ -330,6 +330,7 @@ impl CoreResourceManager {
let ua = self.user_agent.clone();
let dc = self.devtools_chan.clone();
let filemanager = self.filemanager.clone();

thread::Builder::new().name(format!("fetch thread for {}", init.url)).spawn(move || {
let request = Request::from_init(init);
// XXXManishearth: Check origin against pipeline id (also ensure that the mode is allowed)
@@ -77,6 +77,7 @@ pub enum RequestMode {
SameOrigin,
NoCors,
CorsMode,
WebSocket
}

/// Request [credentials mode](https://fetch.spec.whatwg.org/#concept-request-credentials-mode)
@@ -826,6 +826,7 @@ impl Into<RequestMode> for NetTraitsRequestMode {
NetTraitsRequestMode::SameOrigin => RequestMode::Same_origin,
NetTraitsRequestMode::NoCors => RequestMode::No_cors,
NetTraitsRequestMode::CorsMode => RequestMode::Cors,
NetTraitsRequestMode::WebSocket => unreachable!("Websocket request mode should never be exposed to JS"),
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.