Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)

This commit is contained in:
Simon Sapin 2015-07-10 22:48:05 +02:00
parent 64751b8eef
commit 83d2a11d86
21 changed files with 260 additions and 152 deletions

View file

@ -66,7 +66,7 @@ time = "0.1.12"
bitflags = "*"
rustc-serialize = "*"
libc = "*"
hyper = "0.5"
hyper = "0.6"
cssparser = "0.3.1"
unicase = "0.1"
num = "0.1.24"

View file

@ -460,11 +460,7 @@ fn is_simple_method(m: &Method) -> bool {
pub fn allow_cross_origin_request(req: &CORSRequest, headers: &Headers) -> bool {
match headers.get::<AccessControlAllowOrigin>() {
Some(&AccessControlAllowOrigin::Any) => true, // Not always true, depends on credentials mode
// FIXME: https://github.com/servo/servo/issues/6020
Some(&AccessControlAllowOrigin::Value(ref url)) =>
url.scheme == req.origin.scheme &&
url.host() == req.origin.host() &&
url.port() == req.origin.port(),
Some(&AccessControlAllowOrigin::Value(ref url)) => req.origin.serialize() == *url,
Some(&AccessControlAllowOrigin::Null) |
None => false
}

View file

@ -34,11 +34,19 @@ use std::cell::RefCell;
use std::collections::hash_map::HashMap;
use std::collections::hash_map::Entry::{Vacant, Occupied};
use std::marker::PhantomData;
use std::rc::Rc;
use std::sync::{Arc, Mutex};
use core::nonzero::NonZero;
thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> = Rc::new(RefCell::new(None)));
#[allow(missing_docs)] // FIXME
mod dummy { // Attributes dont apply through the macro.
use std::rc::Rc;
use std::cell::RefCell;
use super::LiveDOMReferences;
thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> =
Rc::new(RefCell::new(None)));
}
pub use self::dummy::LIVE_REFERENCES;
/// A pointer to a Rust DOM object that needs to be destroyed.

View file

@ -359,9 +359,16 @@ pub struct RootedTraceableSet {
set: Vec<TraceableInfo>
}
/// TLV Holds a set of JSTraceables that need to be rooted
thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> =
Rc::new(RefCell::new(RootedTraceableSet::new())));
#[allow(missing_docs)] // FIXME
mod dummy { // Attributes dont apply through the macro.
use std::rc::Rc;
use std::cell::RefCell;
use super::RootedTraceableSet;
/// TLV Holds a set of JSTraceables that need to be rooted
thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> =
Rc::new(RefCell::new(RootedTraceableSet::new())));
}
pub use self::dummy::ROOTED_TRACEABLES;
impl RootedTraceableSet {
fn new() -> RootedTraceableSet {

View file

@ -820,6 +820,7 @@ unsafe extern "C" fn instance_class_has_proto_at_depth(clasp: *const js::jsapi::
(domclass.dom_class.interface_chain[depth as usize] as u32 == proto_id) as u8
}
#[allow(missing_docs)] // FIXME
pub const DOM_CALLBACKS: DOMCallbacks = DOMCallbacks {
instanceClassMatchesProto: Some(instance_class_has_proto_at_depth),
};

View file

@ -1038,6 +1038,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for &'a XMLHttpRequest {
use std::fmt;
use hyper::header::{Header, HeaderFormat};
use hyper::header::SetCookie;
use hyper::error::Result;
// a dummy header so we can use headers.remove::<SetCookie2>()
#[derive(Clone, Debug)]
@ -1047,7 +1048,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for &'a XMLHttpRequest {
"set-cookie2"
}
fn parse_header(_: &[Vec<u8>]) -> Option<SetCookie2> {
fn parse_header(_: &[Vec<u8>]) -> Result<SetCookie2> {
unimplemented!()
}
}