mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
This commit is contained in:
parent
bc618b0d53
commit
dc0e467945
59 changed files with 1092 additions and 978 deletions
|
@ -64,17 +64,13 @@ git = "https://github.com/servo/ipc-channel"
|
||||||
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
||||||
features = ["texture_surface"]
|
features = ["texture_surface"]
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies.gaol]
|
[dependencies.gaol]
|
||||||
git = "https://github.com/pcwalton/gaol"
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
image = "0.4.0"
|
image = "0.5.0"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
num = "0.1.24"
|
num = "0.1.24"
|
||||||
time = "0.1.17"
|
time = "0.1.17"
|
||||||
|
@ -82,6 +78,7 @@ gleam = "0.1"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
[target.x86_64-apple-darwin.dependencies]
|
[target.x86_64-apple-darwin.dependencies]
|
||||||
core-graphics = "0.1"
|
core-graphics = "0.1"
|
||||||
|
|
|
@ -7,10 +7,6 @@ authors = ["The Servo Project Developers"]
|
||||||
name = "devtools"
|
name = "devtools"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.devtools_traits]
|
[dependencies.devtools_traits]
|
||||||
path = "../devtools_traits"
|
path = "../devtools_traits"
|
||||||
|
|
||||||
|
@ -26,14 +22,11 @@ path = "../plugins"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -7,20 +7,12 @@ authors = ["The Servo Project Developers"]
|
||||||
name = "devtools_traits"
|
name = "devtools_traits"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.msg]
|
[dependencies.msg]
|
||||||
path = "../msg"
|
path = "../msg"
|
||||||
|
|
||||||
[dependencies.util]
|
[dependencies.util]
|
||||||
path = "../util"
|
path = "../util"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
|
@ -28,9 +20,11 @@ git = "https://github.com/servo/ipc-channel"
|
||||||
path = "../plugins"
|
path = "../plugins"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ euclid = {version = "0.3", features = ["plugins"]}
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
harfbuzz-sys = "0.1"
|
harfbuzz-sys = "0.1"
|
||||||
lazy_static = "0.1"
|
lazy_static = "0.1"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
|
@ -25,6 +25,7 @@ smallvec = "0.1"
|
||||||
string_cache = "0.2"
|
string_cache = "0.2"
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
unicode-script = { version = "0.1", features = ["harfbuzz"] }
|
unicode-script = { version = "0.1", features = ["harfbuzz"] }
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
[dependencies.plugins]
|
[dependencies.plugins]
|
||||||
path = "../plugins"
|
path = "../plugins"
|
||||||
|
@ -67,10 +68,6 @@ path = "../script_traits"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[target.x86_64-apple-darwin.dependencies]
|
[target.x86_64-apple-darwin.dependencies]
|
||||||
core-foundation = "0.1"
|
core-foundation = "0.1"
|
||||||
core-graphics = "0.1"
|
core-graphics = "0.1"
|
||||||
|
|
|
@ -27,7 +27,6 @@ use euclid::size::Size2D;
|
||||||
use filters;
|
use filters;
|
||||||
use font_context::FontContext;
|
use font_context::FontContext;
|
||||||
use gfx_traits::color;
|
use gfx_traits::color;
|
||||||
use libc::types::common::c99::uint32_t;
|
|
||||||
use msg::compositor_msg::LayerKind;
|
use msg::compositor_msg::LayerKind;
|
||||||
use net_traits::image::base::{Image, PixelFormat};
|
use net_traits::image::base::{Image, PixelFormat};
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
|
@ -1803,7 +1802,7 @@ impl ScaledFontExtensionMethods for ScaledFont {
|
||||||
let glyph_advance = glyph.advance();
|
let glyph_advance = glyph.advance();
|
||||||
let glyph_offset = glyph.offset().unwrap_or(Point2D::zero());
|
let glyph_offset = glyph.offset().unwrap_or(Point2D::zero());
|
||||||
let azglyph = struct__AzGlyph {
|
let azglyph = struct__AzGlyph {
|
||||||
mIndex: glyph.id() as uint32_t,
|
mIndex: glyph.id() as u32,
|
||||||
mPosition: struct__AzPoint {
|
mPosition: struct__AzPoint {
|
||||||
x: (origin.x + glyph_offset.x).to_f32_px(),
|
x: (origin.x + glyph_offset.x).to_f32_px(),
|
||||||
y: (origin.y + glyph_offset.y).to_f32_px(),
|
y: (origin.y + glyph_offset.y).to_f32_px(),
|
||||||
|
@ -1819,7 +1818,7 @@ impl ScaledFontExtensionMethods for ScaledFont {
|
||||||
|
|
||||||
let mut glyphbuf = struct__AzGlyphBuffer {
|
let mut glyphbuf = struct__AzGlyphBuffer {
|
||||||
mGlyphs: azglyphs.as_mut_ptr(),
|
mGlyphs: azglyphs.as_mut_ptr(),
|
||||||
mNumGlyphs: azglyph_buf_len as uint32_t
|
mNumGlyphs: azglyph_buf_len as u32
|
||||||
};
|
};
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -59,10 +59,6 @@ git = "https://github.com/tomaka/clock_ticks"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
||||||
|
@ -71,7 +67,7 @@ encoding = "0.2"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
selectors = "0.2"
|
selectors = "0.2"
|
||||||
smallvec = "0.1"
|
smallvec = "0.1"
|
||||||
string_cache = "0.2"
|
string_cache = "0.2"
|
||||||
|
@ -81,3 +77,4 @@ serde_macros = "0.6"
|
||||||
serde_json = "0.5"
|
serde_json = "0.5"
|
||||||
unicode-bidi = "0.2"
|
unicode-bidi = "0.2"
|
||||||
unicode-script = { version = "0.1", features = ["harfbuzz"] }
|
unicode-script = { version = "0.1", features = ["harfbuzz"] }
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -28,12 +28,8 @@ path = "../util"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -24,14 +24,6 @@ features = ["plugins"]
|
||||||
git = "https://github.com/servo/rust-layers"
|
git = "https://github.com/servo/rust-layers"
|
||||||
features = ["plugins"]
|
features = ["plugins"]
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2.36"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
|
@ -45,10 +37,12 @@ path = "../plugins"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
rustc-serialize = "0.3.4"
|
rustc-serialize = "0.3.4"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
[target.x86_64-apple-darwin.dependencies]
|
[target.x86_64-apple-darwin.dependencies]
|
||||||
core-foundation = "0.1"
|
core-foundation = "0.1"
|
||||||
|
|
|
@ -22,27 +22,21 @@ git = "https://github.com/ende76/brotli-rs"
|
||||||
[dependencies.plugins]
|
[dependencies.plugins]
|
||||||
path = "../plugins"
|
path = "../plugins"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.msg]
|
[dependencies.msg]
|
||||||
path = "../msg"
|
path = "../msg"
|
||||||
|
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
time = "0.1.17"
|
time = "0.1.17"
|
||||||
openssl="0.6.1"
|
openssl = "0.7.0"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
cookie = "0.1"
|
cookie = "0.2"
|
||||||
mime_guess = "1.1.1"
|
mime_guess = "1.1.1"
|
||||||
flate2 = "0.2.0"
|
flate2 = "0.2.0"
|
||||||
uuid = "0.1.16"
|
uuid = "0.1.16"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -10,7 +10,6 @@ use mime_classifier::MIMEClassifier;
|
||||||
use net_traits::ProgressMsg::Done;
|
use net_traits::ProgressMsg::Done;
|
||||||
use net_traits::{LoadConsumer, LoadData, Metadata};
|
use net_traits::{LoadConsumer, LoadData, Metadata};
|
||||||
use resource_task::{CancellationListener, send_error, start_sending_sniffed_opt};
|
use resource_task::{CancellationListener, send_error, start_sending_sniffed_opt};
|
||||||
use std::fs::PathExt;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use util::resource_files::resources_dir_path;
|
use util::resource_files::resources_dir_path;
|
||||||
|
|
|
@ -115,7 +115,7 @@ impl Cookie {
|
||||||
pub fn path_match(request_path: &str, cookie_path: &str) -> bool {
|
pub fn path_match(request_path: &str, cookie_path: &str) -> bool {
|
||||||
request_path == cookie_path ||
|
request_path == cookie_path ||
|
||||||
( request_path.starts_with(cookie_path) &&
|
( request_path.starts_with(cookie_path) &&
|
||||||
( request_path.ends_with("/") || request_path.as_bytes()[cookie_path.len() - 1] == b'/' )
|
( request_path.ends_with("/") || request_path[cookie_path.len()..].starts_with("/"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,23 +16,17 @@ path = "../msg"
|
||||||
[dependencies.stb_image]
|
[dependencies.stb_image]
|
||||||
git = "https://github.com/servo/rust-stb-image"
|
git = "https://github.com/servo/rust-stb-image"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies.plugins]
|
[dependencies.plugins]
|
||||||
path = "../plugins"
|
path = "../plugins"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
image = "0.4.0"
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
|
image = "0.5.0"
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -16,8 +16,8 @@ git = "https://github.com/Manishearth/rust-clippy"
|
||||||
branch = "servo"
|
branch = "servo"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dependencies.url]
|
[dependencies]
|
||||||
version = "0.2.36"
|
url = "0.5"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//! - `#[dom_struct]` : Implies `#[privatize]`,`#[derive(JSTraceable)]`, and `#[must_root]`.
|
//! - `#[dom_struct]` : Implies `#[privatize]`,`#[derive(JSTraceable)]`, and `#[must_root]`.
|
||||||
//! Use this for structs that correspond to a DOM type
|
//! Use this for structs that correspond to a DOM type
|
||||||
|
|
||||||
#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private)]
|
#![feature(plugin_registrar, quote, plugin, box_syntax, rustc_private, slice_patterns)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
|
|
|
@ -24,13 +24,13 @@ impl LintPass for InheritancePass {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LateLintPass for InheritancePass {
|
impl LateLintPass for InheritancePass {
|
||||||
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _n: ast::Name,
|
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::VariantData, _n: ast::Name,
|
||||||
_gen: &hir::Generics, id: ast::NodeId) {
|
_gen: &hir::Generics, id: ast::NodeId) {
|
||||||
// Lints are run post expansion, so it's fine to use
|
// Lints are run post expansion, so it's fine to use
|
||||||
// #[_dom_struct_marker] here without also checking for #[dom_struct]
|
// #[_dom_struct_marker] here without also checking for #[dom_struct]
|
||||||
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
|
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
|
||||||
// Find the reflector, if any
|
// Find the reflector, if any
|
||||||
let reflector_span = def.fields.iter().enumerate()
|
let reflector_span = def.fields().iter().enumerate()
|
||||||
.find(|&(ctr, f)| {
|
.find(|&(ctr, f)| {
|
||||||
if match_lang_ty(cx, &*f.node.ty, "reflector") {
|
if match_lang_ty(cx, &*f.node.ty, "reflector") {
|
||||||
if ctr > 0 {
|
if ctr > 0 {
|
||||||
|
@ -44,7 +44,7 @@ impl LateLintPass for InheritancePass {
|
||||||
})
|
})
|
||||||
.map(|(_, f)| f.span);
|
.map(|(_, f)| f.span);
|
||||||
// Find all #[dom_struct] fields
|
// Find all #[dom_struct] fields
|
||||||
let dom_spans: Vec<_> = def.fields.iter().enumerate().filter_map(|(ctr, f)| {
|
let dom_spans: Vec<_> = def.fields().iter().enumerate().filter_map(|(ctr, f)| {
|
||||||
if let hir::TyPath(..) = f.node.ty.node {
|
if let hir::TyPath(..) = f.node.ty.node {
|
||||||
if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) =
|
if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) =
|
||||||
cx.tcx.def_map.borrow().get(&f.node.ty.id) {
|
cx.tcx.def_map.borrow().get(&f.node.ty.id) {
|
||||||
|
|
|
@ -25,12 +25,12 @@ impl LintPass for PrivatizePass {
|
||||||
impl LateLintPass for PrivatizePass {
|
impl LateLintPass for PrivatizePass {
|
||||||
fn check_struct_def(&mut self,
|
fn check_struct_def(&mut self,
|
||||||
cx: &LateContext,
|
cx: &LateContext,
|
||||||
def: &hir::StructDef,
|
def: &hir::VariantData,
|
||||||
_n: ast::Name,
|
_n: ast::Name,
|
||||||
_gen: &hir::Generics,
|
_gen: &hir::Generics,
|
||||||
id: ast::NodeId) {
|
id: ast::NodeId) {
|
||||||
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
|
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
|
||||||
for field in &def.fields {
|
for field in def.fields() {
|
||||||
match field.node {
|
match field.node {
|
||||||
hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => {
|
hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => {
|
||||||
cx.span_lint(PRIVATIZE, field.span,
|
cx.span_lint(PRIVATIZE, field.span,
|
||||||
|
|
|
@ -80,7 +80,7 @@ impl LateLintPass for UnrootedPass {
|
||||||
/// All structs containing #[must_root] types must be #[must_root] themselves
|
/// All structs containing #[must_root] types must be #[must_root] themselves
|
||||||
fn check_struct_def(&mut self,
|
fn check_struct_def(&mut self,
|
||||||
cx: &LateContext,
|
cx: &LateContext,
|
||||||
def: &hir::StructDef,
|
def: &hir::VariantData,
|
||||||
_n: ast::Name,
|
_n: ast::Name,
|
||||||
_gen: &hir::Generics,
|
_gen: &hir::Generics,
|
||||||
id: ast::NodeId) {
|
id: ast::NodeId) {
|
||||||
|
@ -89,7 +89,7 @@ impl LateLintPass for UnrootedPass {
|
||||||
_ => cx.tcx.map.expect_item(cx.tcx.map.get_parent(id)),
|
_ => cx.tcx.map.expect_item(cx.tcx.map.get_parent(id)),
|
||||||
};
|
};
|
||||||
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
for ref field in &def.fields {
|
for ref field in def.fields() {
|
||||||
if is_unrooted_ty(cx, cx.tcx.node_id_to_type(field.node.id), false) {
|
if is_unrooted_ty(cx, cx.tcx.node_id_to_type(field.node.id), false) {
|
||||||
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
|
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
|
||||||
"Type must be rooted, use #[must_root] on the struct definition to propagate")
|
"Type must be rooted, use #[must_root] on the struct definition to propagate")
|
||||||
|
@ -101,13 +101,13 @@ impl LateLintPass for UnrootedPass {
|
||||||
/// All enums containing #[must_root] types must be #[must_root] themselves
|
/// All enums containing #[must_root] types must be #[must_root] themselves
|
||||||
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
|
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
|
||||||
let ref map = cx.tcx.map;
|
let ref map = cx.tcx.map;
|
||||||
if map.expect_item(map.get_parent(var.node.id)).attrs.iter().all(|a| !a.check_name("must_root")) {
|
if map.expect_item(map.get_parent(var.node.data.id())).attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
match var.node.kind {
|
match var.node.data {
|
||||||
hir::TupleVariantKind(ref vec) => {
|
hir::VariantData::Tuple(ref vec, _) => {
|
||||||
for ty in vec {
|
for ty in vec {
|
||||||
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.id).map(|t| {
|
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.node.id).map(|t| {
|
||||||
if is_unrooted_ty(cx, t, false) {
|
if is_unrooted_ty(cx, t, false) {
|
||||||
cx.span_lint(UNROOTED_MUST_ROOT, ty.ty.span,
|
cx.span_lint(UNROOTED_MUST_ROOT, ty.node.ty.span,
|
||||||
"Type must be rooted, use #[must_root] on \
|
"Type must be rooted, use #[must_root] on \
|
||||||
the enum definition to propagate")
|
the enum definition to propagate")
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
|
||||||
if let ast::ItemStruct(ref def, _) = item.node {
|
if let ast::ItemStruct(ref def, _) = item.node {
|
||||||
let struct_name = item.ident;
|
let struct_name = item.ident;
|
||||||
// This path has to be hardcoded, unfortunately, since we can't resolve paths at expansion time
|
// This path has to be hardcoded, unfortunately, since we can't resolve paths at expansion time
|
||||||
match def.fields.iter().find(
|
match def.fields().iter().find(
|
||||||
|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "reflector", "Reflector"]).is_some()) {
|
|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "reflector", "Reflector"]).is_some()) {
|
||||||
// If it has a field that is a Reflector, use that
|
// If it has a field that is a Reflector, use that
|
||||||
Some(f) => {
|
Some(f) => {
|
||||||
|
@ -34,7 +34,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
|
||||||
},
|
},
|
||||||
// Or just call it on the first field (supertype).
|
// Or just call it on the first field (supertype).
|
||||||
None => {
|
None => {
|
||||||
let field_name = def.fields[0].node.ident();
|
let field_name = def.fields()[0].node.ident();
|
||||||
let impl_item = quote_item!(cx,
|
let impl_item = quote_item!(cx,
|
||||||
impl ::dom::bindings::reflector::Reflectable for $struct_name {
|
impl ::dom::bindings::reflector::Reflectable for $struct_name {
|
||||||
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::reflector::Reflector {
|
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::reflector::Reflector {
|
||||||
|
|
|
@ -16,7 +16,7 @@ use url::{Url, Host, RelativeSchemeData, SchemeData};
|
||||||
pub fn expand_url(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
|
pub fn expand_url(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
|
||||||
-> Box<MacResult + 'static> {
|
-> Box<MacResult + 'static> {
|
||||||
let mut parser = parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), tts.to_vec());
|
let mut parser = parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), tts.to_vec());
|
||||||
let query_expr = cx.expander().fold_expr(parser.parse_expr());
|
let query_expr = cx.expander().fold_expr(parser.parse_expr_nopanic().unwrap());
|
||||||
|
|
||||||
// Ensure a str literal was passed to the macro
|
// Ensure a str literal was passed to the macro
|
||||||
let query = match parse_str_lit(&query_expr) {
|
let query = match parse_str_lit(&query_expr) {
|
||||||
|
@ -114,17 +114,22 @@ impl<'a> ExtCtxtHelpers for ExtCtxt<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn expr_host(&self, sp: Span, host: Host) -> syntax::ptr::P<Expr> {
|
fn expr_host(&self, _sp: Span, host: Host) -> syntax::ptr::P<Expr> {
|
||||||
match host {
|
match host {
|
||||||
Host::Domain(domain) => quote_expr!(self, ::url::Host::Domain(String::from($domain))),
|
Host::Domain(domain) => quote_expr!(self, ::url::Host::Domain(String::from($domain))),
|
||||||
Host::Ipv6(address) => {
|
Host::Ipv6(address) => {
|
||||||
let pieces_expr = self.expr_slice_u16(sp, &address.pieces);
|
let [a, b, c, d, e, f, g, h] = address.segments();
|
||||||
quote_expr!(self,
|
quote_expr!(self,
|
||||||
::url::Host::Ipv6(
|
::url::Host::Ipv6(::std::net::Ipv6Addr::new(
|
||||||
::url::Ipv6Address {
|
$a, $b, $c, $d, $e, $f, $g, $h
|
||||||
pieces: $pieces_expr.to_owned()
|
)))
|
||||||
}
|
},
|
||||||
))
|
Host::Ipv4(address) => {
|
||||||
|
let [a, b, c, d] = address.octets();
|
||||||
|
quote_expr!(self,
|
||||||
|
::url::Host::Ipv4(::std::net::Ipv4Addr::new(
|
||||||
|
$a, $b, $c, $d
|
||||||
|
)))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
regex = "0.1.14"
|
regex = "0.1.14"
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,6 @@ path = "../canvas_traits"
|
||||||
[dependencies.js]
|
[dependencies.js]
|
||||||
git = "https://github.com/servo/rust-mozjs"
|
git = "https://github.com/servo/rust-mozjs"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2.36"
|
|
||||||
features = ["query_encoding", "serde_serialization"]
|
|
||||||
|
|
||||||
[dependencies.offscreen_gl_context]
|
[dependencies.offscreen_gl_context]
|
||||||
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
||||||
|
|
||||||
|
@ -62,10 +58,6 @@ branch = "servo"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.6"
|
|
||||||
features = [ "serde-serialization" ]
|
|
||||||
|
|
||||||
[dependencies.xml5ever]
|
[dependencies.xml5ever]
|
||||||
git = "https://github.com/Ygg01/xml5ever"
|
git = "https://github.com/Ygg01/xml5ever"
|
||||||
features = ["unstable"]
|
features = ["unstable"]
|
||||||
|
@ -76,13 +68,14 @@ cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
encoding = "0.2"
|
encoding = "0.2"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
|
hyper = { version = "0.7", features = [ "serde-serialization" ] }
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
unicase = "1.0"
|
unicase = "1.0"
|
||||||
num = "0.1.24"
|
num = "0.1.24"
|
||||||
websocket = "0.12.0"
|
websocket = "0.14.0"
|
||||||
uuid = "0.1.16"
|
uuid = "0.1.16"
|
||||||
smallvec = "0.1"
|
smallvec = "0.1"
|
||||||
html5ever = { version = "0.2.1", features = ["unstable"] }
|
html5ever = { version = "0.2.1", features = ["unstable"] }
|
||||||
|
@ -93,4 +86,5 @@ tendril = "0.1.1"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
caseless = "0.1.0"
|
caseless = "0.1.0"
|
||||||
image = "0.4.0"
|
image = "0.5.0"
|
||||||
|
url = "0.5"
|
||||||
|
|
|
@ -1659,7 +1659,7 @@ impl DocumentMethods for Document {
|
||||||
|
|
||||||
if let Some(&Host::Ipv6(ipv6)) = origin.host() {
|
if let Some(&Host::Ipv6(ipv6)) = origin.host() {
|
||||||
// Omit square brackets for IPv6 addresses.
|
// Omit square brackets for IPv6 addresses.
|
||||||
return DOMString::from(ipv6.serialize());
|
return DOMString::from(ipv6.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
DOMString::from(origin.serialize_host().unwrap_or_else(|| "".to_owned()))
|
DOMString::from(origin.serialize_host().unwrap_or_else(|| "".to_owned()))
|
||||||
|
|
|
@ -39,7 +39,7 @@ use websocket::client::receiver::Receiver;
|
||||||
use websocket::client::request::Url;
|
use websocket::client::request::Url;
|
||||||
use websocket::client::sender::Sender;
|
use websocket::client::sender::Sender;
|
||||||
use websocket::header::Origin;
|
use websocket::header::Origin;
|
||||||
use websocket::message::CloseData;
|
use websocket::message::Type;
|
||||||
use websocket::result::WebSocketResult;
|
use websocket::result::WebSocketResult;
|
||||||
use websocket::stream::WebSocketStream;
|
use websocket::stream::WebSocketStream;
|
||||||
use websocket::ws::receiver::Receiver as WSReceiver;
|
use websocket::ws::receiver::Receiver as WSReceiver;
|
||||||
|
@ -264,23 +264,27 @@ impl WebSocket {
|
||||||
sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, open_task)).unwrap();
|
sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, open_task)).unwrap();
|
||||||
|
|
||||||
for message in receiver.incoming_messages() {
|
for message in receiver.incoming_messages() {
|
||||||
let message = match message {
|
let message: Message = match message {
|
||||||
Ok(Message::Text(text)) => MessageData::Text(text),
|
Ok(m) => m,
|
||||||
Ok(Message::Binary(data)) => MessageData::Binary(data),
|
Err(_) => break,
|
||||||
Ok(Message::Ping(data)) => {
|
};
|
||||||
ws_sender.lock().unwrap().send_message(Message::Pong(data)).unwrap();
|
let message = match message.opcode {
|
||||||
|
Type::Text => MessageData::Text(String::from_utf8_lossy(&message.payload).into_owned()),
|
||||||
|
Type::Binary => MessageData::Binary(message.payload.into_owned()),
|
||||||
|
Type::Ping => {
|
||||||
|
let pong = Message::pong(message.payload);
|
||||||
|
ws_sender.lock().unwrap().send_message(&pong).unwrap();
|
||||||
continue;
|
continue;
|
||||||
},
|
},
|
||||||
Ok(Message::Pong(_)) => continue,
|
Type::Pong => continue,
|
||||||
Ok(Message::Close(data)) => {
|
Type::Close => {
|
||||||
ws_sender.lock().unwrap().send_message(Message::Close(data)).unwrap();
|
ws_sender.lock().unwrap().send_message(&message).unwrap();
|
||||||
let task = box CloseTask {
|
let task = box CloseTask {
|
||||||
addr: address,
|
addr: address,
|
||||||
};
|
};
|
||||||
sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap();
|
sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap();
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
Err(_) => break,
|
|
||||||
};
|
};
|
||||||
let message_task = box MessageReceivedTask {
|
let message_task = box MessageReceivedTask {
|
||||||
address: address.clone(),
|
address: address.clone(),
|
||||||
|
@ -385,7 +389,7 @@ impl WebSocketMethods for WebSocket {
|
||||||
if send_data {
|
if send_data {
|
||||||
let mut other_sender = self.sender.borrow_mut();
|
let mut other_sender = self.sender.borrow_mut();
|
||||||
let my_sender = other_sender.as_mut().unwrap();
|
let my_sender = other_sender.as_mut().unwrap();
|
||||||
let _ = my_sender.lock().unwrap().send_message(Message::Text(data.0));
|
let _ = my_sender.lock().unwrap().send_message(&Message::text(data.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -404,7 +408,7 @@ impl WebSocketMethods for WebSocket {
|
||||||
if send_data {
|
if send_data {
|
||||||
let mut other_sender = self.sender.borrow_mut();
|
let mut other_sender = self.sender.borrow_mut();
|
||||||
let my_sender = other_sender.as_mut().unwrap();
|
let my_sender = other_sender.as_mut().unwrap();
|
||||||
let _ = my_sender.lock().unwrap().send_message(Message::Binary(data.clone_bytes()));
|
let _ = my_sender.lock().unwrap().send_message(&Message::binary(data.clone_bytes()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -420,7 +424,7 @@ impl WebSocketMethods for WebSocket {
|
||||||
if let Some(sender) = sender.as_mut() {
|
if let Some(sender) = sender.as_mut() {
|
||||||
let code: u16 = this.code.get();
|
let code: u16 = this.code.get();
|
||||||
let reason = this.reason.borrow().clone();
|
let reason = this.reason.borrow().clone();
|
||||||
let _ = sender.lock().unwrap().send_message(Message::Close(Some(CloseData::new(code, reason))));
|
let _ = sender.lock().unwrap().send_message(&Message::close_because(code, reason));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,14 +28,11 @@ path = "../devtools_traits"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
|
url = "0.5"
|
||||||
|
|
570
components/servo/Cargo.lock
generated
570
components/servo/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -18,7 +18,7 @@ doc = false
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
image = "0.4.0"
|
image = "0.5.0"
|
||||||
|
|
||||||
[dev-dependencies.gfx_tests]
|
[dev-dependencies.gfx_tests]
|
||||||
path = "../../tests/unit/gfx"
|
path = "../../tests/unit/gfx"
|
||||||
|
@ -124,10 +124,6 @@ optional = true
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
features = ["release_max_level_info"]
|
features = ["release_max_level_info"]
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies.euclid]
|
[dependencies.euclid]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
features = ["plugins"]
|
features = ["plugins"]
|
||||||
|
@ -152,4 +148,6 @@ git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
||||||
env_logger = "0.3"
|
env_logger = "0.3"
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
|
url = {version = "0.5", features = ["serde_serialization", "query_encoding"]}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ mod android {
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
|
|
||||||
pub fn setup_logging() {
|
pub fn setup_logging() {
|
||||||
use self::libc::consts::os::posix88::{STDERR_FILENO, STDOUT_FILENO};
|
use self::libc::{STDERR_FILENO, STDOUT_FILENO};
|
||||||
//use std::env;
|
//use std::env;
|
||||||
|
|
||||||
//env::set_var("RUST_LOG", "servo,gfx,msg,util,layers,js,std,rt,extra");
|
//env::set_var("RUST_LOG", "servo,gfx,msg,util,layers,js,std,rt,extra");
|
||||||
|
@ -239,14 +239,14 @@ mod android {
|
||||||
unsafe { super::app_dummy(); }
|
unsafe { super::app_dummy(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
struct FilePtr(*mut self::libc::types::common::c95::FILE);
|
struct FilePtr(*mut self::libc::FILE);
|
||||||
|
|
||||||
unsafe impl Send for FilePtr {}
|
unsafe impl Send for FilePtr {}
|
||||||
|
|
||||||
fn redirect_output(file_no: c_int) {
|
fn redirect_output(file_no: c_int) {
|
||||||
use self::libc::funcs::c95::stdio::fgets;
|
use self::libc::fdopen;
|
||||||
use self::libc::funcs::posix88::stdio::fdopen;
|
use self::libc::fgets;
|
||||||
use self::libc::funcs::posix88::unistd::{pipe, dup2};
|
use self::libc::{pipe, dup2};
|
||||||
use servo::util::task::spawn_named;
|
use servo::util::task::spawn_named;
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::ffi::CString;
|
use std::ffi::CString;
|
||||||
|
|
|
@ -18,10 +18,6 @@ path = "../util"
|
||||||
[dependencies.style_traits]
|
[dependencies.style_traits]
|
||||||
path = "../style_traits"
|
path = "../style_traits"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
||||||
|
@ -39,3 +35,5 @@ string_cache = "0.2"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,6 @@ path = "../util"
|
||||||
[dependencies.plugins]
|
[dependencies.plugins]
|
||||||
path = "../plugins"
|
path = "../plugins"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
|
@ -27,3 +23,5 @@ rustc-serialize = "0.3"
|
||||||
selectors = "0.2"
|
selectors = "0.2"
|
||||||
serde = "0.6"
|
serde = "0.6"
|
||||||
serde_macros = "0.6"
|
serde_macros = "0.6"
|
||||||
|
url = "0.5"
|
||||||
|
|
||||||
|
|
|
@ -32,17 +32,13 @@ features = ["plugins"]
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
cssparser = { version = "0.4", features = [ "serde-serialization" ] }
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
html5ever = { version = "0.2.1", features = ["unstable"] }
|
html5ever = { version = "0.2.1", features = ["unstable"] }
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
smallvec = "0.1"
|
smallvec = "0.1"
|
||||||
|
@ -55,5 +51,6 @@ serde_macros = "0.6"
|
||||||
string_cache = "0.2"
|
string_cache = "0.2"
|
||||||
lazy_static = "0.1"
|
lazy_static = "0.1"
|
||||||
getopts = "0.2.11"
|
getopts = "0.2.11"
|
||||||
hyper = "0.6"
|
hyper = "0.7"
|
||||||
|
url = "0.5"
|
||||||
uuid = "0.1.17"
|
uuid = "0.1.17"
|
||||||
|
|
|
@ -12,10 +12,8 @@
|
||||||
#![feature(heap_api)]
|
#![feature(heap_api)]
|
||||||
#![feature(oom)]
|
#![feature(oom)]
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
#![cfg_attr(not(target_os = "android"), feature(path_ext))]
|
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(reflect_marker)]
|
#![feature(reflect_marker)]
|
||||||
#![feature(slice_splits)]
|
|
||||||
#![feature(step_by)]
|
#![feature(step_by)]
|
||||||
#![feature(step_trait)]
|
#![feature(step_trait)]
|
||||||
#![feature(zero_one)]
|
#![feature(zero_one)]
|
||||||
|
|
|
@ -157,7 +157,8 @@ impl HeapSizeOf for url::Host {
|
||||||
fn heap_size_of_children(&self) -> usize {
|
fn heap_size_of_children(&self) -> usize {
|
||||||
match *self {
|
match *self {
|
||||||
url::Host::Domain(ref str) => str.heap_size_of_children(),
|
url::Host::Domain(ref str) => str.heap_size_of_children(),
|
||||||
url::Host::Ipv6(_) => 0
|
url::Host::Ipv6(_) => 0,
|
||||||
|
url::Host::Ipv4(_) => 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ pub fn resources_dir_path() -> PathBuf {
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
pub fn resources_dir_path() -> PathBuf {
|
pub fn resources_dir_path() -> PathBuf {
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::PathExt;
|
|
||||||
|
|
||||||
match *CMD_RESOURCE_DIR.lock().unwrap() {
|
match *CMD_RESOURCE_DIR.lock().unwrap() {
|
||||||
Some(ref path) => PathBuf::from(path),
|
Some(ref path) => PathBuf::from(path),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//! higher-level API on top of this could allow safe fork-join parallelism.
|
//! higher-level API on top of this could allow safe fork-join parallelism.
|
||||||
|
|
||||||
use deque::{Abort, BufferPool, Data, Empty, Stealer, Worker};
|
use deque::{Abort, BufferPool, Data, Empty, Stealer, Worker};
|
||||||
use libc::funcs::posix88::unistd::usleep;
|
use libc::usleep;
|
||||||
use rand::{Rng, XorShiftRng, weak_rng};
|
use rand::{Rng, XorShiftRng, weak_rng};
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||||
|
|
|
@ -22,14 +22,11 @@ git = "https://github.com/jgraham/webdriver-rust.git"
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies.url]
|
|
||||||
version = "0.2"
|
|
||||||
features = [ "serde_serialization" ]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
image = "0.4.0"
|
image = "0.5.0"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
hyper = "0.6"
|
hyper = "0.7"
|
||||||
rustc-serialize = "0.3.4"
|
rustc-serialize = "0.3.4"
|
||||||
regex = "0.1.33"
|
regex = "0.1.33"
|
||||||
|
url = "0.5"
|
||||||
uuid = "0.1"
|
uuid = "0.1"
|
||||||
|
|
556
ports/cef/Cargo.lock
generated
556
ports/cef/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -11,7 +11,7 @@ crate-type = ["dylib"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "*"
|
log = "*"
|
||||||
url = "*"
|
url = "*"
|
||||||
libc = "*"
|
libc = "0.2"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
gleam = "0.1"
|
gleam = "0.1"
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub fn slice_to_str<F>(s: *const u8, l: usize, f: F) -> c_int where F: FnOnce(&s
|
||||||
/// All fields are initialized to zero. It is the caller's responsibility to ensure that the given
|
/// All fields are initialized to zero. It is the caller's responsibility to ensure that the given
|
||||||
/// type is a CEF type with `cef_base_t` as its first member.
|
/// type is a CEF type with `cef_base_t` as its first member.
|
||||||
pub unsafe fn create_cef_object<Base,Extra>(size: size_t) -> *mut Base {
|
pub unsafe fn create_cef_object<Base,Extra>(size: size_t) -> *mut Base {
|
||||||
let object = libc::calloc(1, (mem::size_of::<Base>() + mem::size_of::<Extra>()) as u64) as
|
let object = libc::calloc(1, (mem::size_of::<Base>() + mem::size_of::<Extra>())) as
|
||||||
*mut cef_base_t;
|
*mut cef_base_t;
|
||||||
(*object).size = size;
|
(*object).size = size;
|
||||||
(*object).add_ref = Some(servo_add_ref as extern "C" fn(*mut cef_base_t) -> c_int);
|
(*object).add_ref = Some(servo_add_ref as extern "C" fn(*mut cef_base_t) -> c_int);
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
use eutil::slice_to_str;
|
use eutil::slice_to_str;
|
||||||
use libc::types::os::arch::c95::wchar_t;
|
use libc::{self, size_t, c_int, c_ushort, c_void, wchar_t};
|
||||||
use libc::{self, size_t, c_int, c_ushort, c_void};
|
|
||||||
use std::char;
|
use std::char;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
@ -79,7 +78,7 @@ pub extern "C" fn cef_string_utf8_clear(cs: *mut cef_string_utf8_t) {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_string_userfree_utf8_alloc() -> *mut cef_string_utf8_t {
|
pub extern "C" fn cef_string_userfree_utf8_alloc() -> *mut cef_string_utf8_t {
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::calloc(1, mem::size_of::<cef_string_utf8_t>() as u64) as *mut cef_string_utf8_t
|
libc::calloc(1, mem::size_of::<cef_string_utf8_t>()) as *mut cef_string_utf8_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +158,7 @@ pub extern "C" fn cef_string_utf16_clear(cs: *mut cef_string_utf16_t) {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_string_userfree_utf16_alloc() -> *mut cef_string_utf16_t {
|
pub extern "C" fn cef_string_userfree_utf16_alloc() -> *mut cef_string_utf16_t {
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::calloc(1, mem::size_of::<cef_string_utf16_t>() as u64) as *mut cef_string_utf16_t
|
libc::calloc(1, mem::size_of::<cef_string_utf16_t>()) as *mut cef_string_utf16_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +168,7 @@ pub extern "C" fn cef_string_utf16_set(src: *const c_ushort, src_len: size_t, ou
|
||||||
unsafe {
|
unsafe {
|
||||||
if copy != 0 {
|
if copy != 0 {
|
||||||
if !src.is_null() && src_len > 0 {
|
if !src.is_null() && src_len > 0 {
|
||||||
(*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<c_ushort>() as u64) as
|
(*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<c_ushort>()) as
|
||||||
*mut u16;
|
*mut u16;
|
||||||
if (*output).str.is_null() {
|
if (*output).str.is_null() {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -217,7 +216,7 @@ pub extern "C" fn cef_string_wide_clear(cs: *mut cef_string_wide_t) {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_string_userfree_wide_alloc() -> *mut cef_string_wide_t {
|
pub extern "C" fn cef_string_userfree_wide_alloc() -> *mut cef_string_wide_t {
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::calloc(1, mem::size_of::<cef_string_wide_t>() as u64) as *mut cef_string_wide_t
|
libc::calloc(1, mem::size_of::<cef_string_wide_t>()) as *mut cef_string_wide_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ pub extern "C" fn cef_string_wide_set(src: *const wchar_t, src_len: size_t, outp
|
||||||
unsafe {
|
unsafe {
|
||||||
if copy != 0 {
|
if copy != 0 {
|
||||||
if !src.is_null() && src_len > 0 {
|
if !src.is_null() && src_len > 0 {
|
||||||
(*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<wchar_t>() as u64) as
|
(*output).str = libc::calloc(1, (src_len + 1) * mem::size_of::<wchar_t>()) as
|
||||||
*mut wchar_t;
|
*mut wchar_t;
|
||||||
if (*output).str.is_null() {
|
if (*output).str.is_null() {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int
|
||||||
if index as usize > (*lt).len() - 1 { return 0; }
|
if index as usize > (*lt).len() - 1 { return 0; }
|
||||||
let ref string = (*lt)[index as usize];
|
let ref string = (*lt)[index as usize];
|
||||||
let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
|
let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
|
||||||
cef_string_utf16_set(utf16_chars.as_ptr(), utf16_chars.len() as u64, value, 1)
|
cef_string_utf16_set(utf16_chars.as_ptr(), utf16_chars.len(), value, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub extern "C" fn cef_string_map_key(sm: *mut cef_string_map_t, index: c_int, va
|
||||||
match (*sm).keys().nth(index as usize) {
|
match (*sm).keys().nth(index as usize) {
|
||||||
Some(k) => {
|
Some(k) => {
|
||||||
cef_string_utf16_set(k.as_bytes().as_ptr() as *const u16,
|
cef_string_utf16_set(k.as_bytes().as_ptr() as *const u16,
|
||||||
k.len() as u64,
|
k.len(),
|
||||||
value,
|
value,
|
||||||
1)
|
1)
|
||||||
},
|
},
|
||||||
|
|
|
@ -85,7 +85,7 @@ pub extern "C" fn cef_string_multimap_key(smm: *mut cef_string_multimap_t, index
|
||||||
for (key, val) in &(*smm) {
|
for (key, val) in &(*smm) {
|
||||||
if rem < (*val).len() {
|
if rem < (*val).len() {
|
||||||
return cef_string_utf16_set((*key).as_bytes().as_ptr() as *const u16,
|
return cef_string_utf16_set((*key).as_bytes().as_ptr() as *const u16,
|
||||||
(*key).len() as u64,
|
(*key).len(),
|
||||||
value,
|
value,
|
||||||
1);
|
1);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,12 +2,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use libc::{c_uint, c_ushort, c_int, c_double, size_t};
|
use libc::{c_uint, c_ushort, c_int, c_double, size_t, wchar_t};
|
||||||
#[cfg(target_os="linux")]
|
#[cfg(target_os="linux")]
|
||||||
use libc::c_ulong;
|
use libc::c_ulong;
|
||||||
#[cfg(target_os="macos")]
|
#[cfg(target_os="macos")]
|
||||||
use libc::c_void;
|
use libc::c_void;
|
||||||
use libc::types::os::arch::c95::wchar_t;
|
|
||||||
|
|
||||||
use net_traits::net_error_list::NetError;
|
use net_traits::net_error_list::NetError;
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,7 @@ cef_pointer_wrapper!(i32);
|
||||||
cef_pointer_wrapper!(i64);
|
cef_pointer_wrapper!(i64);
|
||||||
cef_pointer_wrapper!(u32);
|
cef_pointer_wrapper!(u32);
|
||||||
cef_pointer_wrapper!(u64);
|
cef_pointer_wrapper!(u64);
|
||||||
|
cef_pointer_wrapper!(usize);
|
||||||
|
|
||||||
cef_noop_wrapper!(());
|
cef_noop_wrapper!(());
|
||||||
cef_noop_wrapper!(*const cef_geolocation_handler_t);
|
cef_noop_wrapper!(*const cef_geolocation_handler_t);
|
||||||
|
@ -187,6 +188,7 @@ cef_noop_wrapper!(f64);
|
||||||
cef_noop_wrapper!(i64);
|
cef_noop_wrapper!(i64);
|
||||||
cef_noop_wrapper!(u32);
|
cef_noop_wrapper!(u32);
|
||||||
cef_noop_wrapper!(u64);
|
cef_noop_wrapper!(u64);
|
||||||
|
cef_noop_wrapper!(usize);
|
||||||
cef_noop_wrapper!(cef_string_list_t);
|
cef_noop_wrapper!(cef_string_list_t);
|
||||||
|
|
||||||
cef_unimplemented_wrapper!(*const *mut cef_v8value_t, *const CefV8Value);
|
cef_unimplemented_wrapper!(*const *mut cef_v8value_t, *const CefV8Value);
|
||||||
|
@ -198,7 +200,7 @@ cef_unimplemented_wrapper!(cef_string_t, String);
|
||||||
impl<'a> CefWrap<*const cef_string_t> for &'a [u16] {
|
impl<'a> CefWrap<*const cef_string_t> for &'a [u16] {
|
||||||
fn to_c(buffer: &'a [u16]) -> *const cef_string_t {
|
fn to_c(buffer: &'a [u16]) -> *const cef_string_t {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ptr = libc::malloc(((buffer.len() + 1) * 2) as u64) as *mut c_ushort;
|
let ptr = libc::malloc(((buffer.len() + 1) * 2)) as *mut c_ushort;
|
||||||
ptr::copy(buffer.as_ptr(), ptr, buffer.len());
|
ptr::copy(buffer.as_ptr(), ptr, buffer.len());
|
||||||
*ptr.offset(buffer.len() as isize) = 0;
|
*ptr.offset(buffer.len() as isize) = 0;
|
||||||
|
|
||||||
|
@ -206,7 +208,7 @@ impl<'a> CefWrap<*const cef_string_t> for &'a [u16] {
|
||||||
// stack space to create the object in. What a botch.
|
// stack space to create the object in. What a botch.
|
||||||
Box::into_raw(box cef_string_utf16 {
|
Box::into_raw(box cef_string_utf16 {
|
||||||
str: ptr,
|
str: ptr,
|
||||||
length: buffer.len() as u64,
|
length: buffer.len(),
|
||||||
dtor: Some(free_boxed_utf16_string as extern "C" fn(*mut c_ushort)),
|
dtor: Some(free_boxed_utf16_string as extern "C" fn(*mut c_ushort)),
|
||||||
}) as *const _
|
}) as *const _
|
||||||
}
|
}
|
||||||
|
@ -267,7 +269,7 @@ impl<'a> CefWrap<cef_string_userfree_t> for String {
|
||||||
boxed_string = libc::malloc(mem::size_of::<cef_string_utf16>() as libc::size_t) as
|
boxed_string = libc::malloc(mem::size_of::<cef_string_utf16>() as libc::size_t) as
|
||||||
*mut cef_string_utf16;
|
*mut cef_string_utf16;
|
||||||
ptr::write(&mut (*boxed_string).str, buffer);
|
ptr::write(&mut (*boxed_string).str, buffer);
|
||||||
ptr::write(&mut (*boxed_string).length, utf16_chars.len() as u64);
|
ptr::write(&mut (*boxed_string).length, utf16_chars.len());
|
||||||
ptr::write(&mut (*boxed_string).dtor, Some(free_utf16_buffer as extern "C" fn(*mut c_ushort)));
|
ptr::write(&mut (*boxed_string).dtor, Some(free_utf16_buffer as extern "C" fn(*mut c_ushort)));
|
||||||
}
|
}
|
||||||
boxed_string
|
boxed_string
|
||||||
|
|
|
@ -14,8 +14,8 @@ headless = ["glutin/headless"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
bitflags = "0.3"
|
bitflags = "0.3"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
url = "0.2"
|
url = "0.5"
|
||||||
gleam = "0.1"
|
gleam = "0.1"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ use glutin;
|
||||||
use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta};
|
use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta};
|
||||||
use layers::geometry::DevicePixel;
|
use layers::geometry::DevicePixel;
|
||||||
use layers::platform::surface::NativeDisplay;
|
use layers::platform::surface::NativeDisplay;
|
||||||
|
use libc::c_void;
|
||||||
#[cfg(feature = "window")]
|
#[cfg(feature = "window")]
|
||||||
use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER};
|
use msg::constellation_msg::{KeyState, NONE, CONTROL, SHIFT, ALT, SUPER};
|
||||||
use msg::constellation_msg::{self, Key};
|
use msg::constellation_msg::{self, Key};
|
||||||
|
@ -149,7 +150,7 @@ impl Window {
|
||||||
|
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
fn load_gl_functions(window: &glutin::Window) {
|
fn load_gl_functions(window: &glutin::Window) {
|
||||||
gl::load_with(|s| window.get_proc_address(s));
|
gl::load_with(|s| window.get_proc_address(s) as *const c_void);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
|
@ -728,7 +729,7 @@ impl Window {
|
||||||
let headless_context = headless_builder.build().unwrap();
|
let headless_context = headless_builder.build().unwrap();
|
||||||
unsafe { headless_context.make_current().expect("Failed to make context current!") };
|
unsafe { headless_context.make_current().expect("Failed to make context current!") };
|
||||||
|
|
||||||
gl::load_with(|s| headless_context.get_proc_address(s));
|
gl::load_with(|s| headless_context.get_proc_address(s) as *const c_void);
|
||||||
|
|
||||||
let window = Window {
|
let window = Window {
|
||||||
context: headless_context,
|
context: headless_context,
|
||||||
|
|
538
ports/gonk/Cargo.lock
generated
538
ports/gonk/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -48,9 +48,9 @@ git = "https://github.com/servo/rust-egl"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.3"
|
env_logger = "0.3"
|
||||||
url = "0.2.16"
|
url = "0.5"
|
||||||
time = "0.1.17"
|
time = "0.1.17"
|
||||||
errno = "0.1"
|
errno = "0.1"
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
gleam = "0.1"
|
gleam = "0.1"
|
||||||
|
|
|
@ -117,7 +117,7 @@ class MachCommands(CommandBase):
|
||||||
help='Force download even if a snapshot already exists')
|
help='Force download even if a snapshot already exists')
|
||||||
def bootstrap_rustc(self, force=False):
|
def bootstrap_rustc(self, force=False):
|
||||||
rust_dir = path.join(
|
rust_dir = path.join(
|
||||||
self.context.sharedir, "rust", *self.rust_snapshot_path().split("/"))
|
self.context.sharedir, "rust", self.rust_snapshot_path())
|
||||||
if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc")):
|
if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc")):
|
||||||
print("Snapshot Rust compiler already downloaded.", end=" ")
|
print("Snapshot Rust compiler already downloaded.", end=" ")
|
||||||
print("Use |bootstrap-rust --force| to download again.")
|
print("Use |bootstrap-rust --force| to download again.")
|
||||||
|
@ -127,16 +127,43 @@ class MachCommands(CommandBase):
|
||||||
shutil.rmtree(rust_dir)
|
shutil.rmtree(rust_dir)
|
||||||
os.makedirs(rust_dir)
|
os.makedirs(rust_dir)
|
||||||
|
|
||||||
snapshot_url = ("https://servo-rust.s3.amazonaws.com/%s.tar.gz"
|
date = self.rust_snapshot_path().split("/")[0]
|
||||||
|
install_dir = path.join(self.context.sharedir, "rust", date)
|
||||||
|
|
||||||
|
# The Rust compiler is hosted on the nightly server under the date with a name
|
||||||
|
# rustc-nightly-HOST-TRIPLE.tar.gz. We just need to pull down and extract it,
|
||||||
|
# giving a directory name that will be the same as the tarball name (rustc is
|
||||||
|
# in that directory).
|
||||||
|
snapshot_url = ("https://static-rust-lang-org.s3.amazonaws.com/dist/%s.tar.gz"
|
||||||
% self.rust_snapshot_path())
|
% self.rust_snapshot_path())
|
||||||
tgz_file = rust_dir + '.tar.gz'
|
tgz_file = rust_dir + '-rustc.tar.gz'
|
||||||
|
|
||||||
download_file("Rust snapshot", snapshot_url, tgz_file)
|
download_file("Rust compiler", snapshot_url, tgz_file)
|
||||||
|
|
||||||
|
print("Extracting Rust compiler...")
|
||||||
|
extract(tgz_file, install_dir)
|
||||||
|
|
||||||
|
# Each Rust stdlib has a name of the form `rust-std-nightly-TRIPLE.tar.gz`, with
|
||||||
|
# a directory of the name `rust-std-TRIPLE` inside and then a `lib` directory.
|
||||||
|
# This `lib` directory needs to be extracted and merged with the `rustc/lib`
|
||||||
|
# directory from the host compiler above.
|
||||||
|
# TODO: make it possible to request an additional cross-target to add to this
|
||||||
|
# list.
|
||||||
|
stdlibs = [host_triple(), "arm-linux-androideabi"]
|
||||||
|
for target in stdlibs:
|
||||||
|
snapshot_url = ("https://static-rust-lang-org.s3.amazonaws.com/dist/%s/rust-std-nightly-%s.tar.gz"
|
||||||
|
% (date, target))
|
||||||
|
tgz_file = install_dir + ('rust-std-nightly-%s.tar.gz' % target)
|
||||||
|
|
||||||
|
download_file("Host rust library for target %s" % target, snapshot_url, tgz_file)
|
||||||
|
print("Extracting Rust stdlib for target %s..." % target)
|
||||||
|
extract(tgz_file, install_dir)
|
||||||
|
shutil.copytree(path.join(install_dir, "rust-std-nightly-%s" % target,
|
||||||
|
"rust-std-%s" % target, "lib", "rustlib", target),
|
||||||
|
path.join(install_dir, "rustc-nightly-%s" % host_triple(),
|
||||||
|
"rustc", "lib", "rustlib", target))
|
||||||
|
shutil.rmtree(path.join(install_dir, "rust-std-nightly-%s" % target))
|
||||||
|
|
||||||
print("Extracting Rust snapshot...")
|
|
||||||
snap_dir = path.join(rust_dir,
|
|
||||||
path.basename(tgz_file).replace(".tar.gz", ""))
|
|
||||||
extract(tgz_file, rust_dir, movedir=snap_dir)
|
|
||||||
print("Snapshot Rust ready.")
|
print("Snapshot Rust ready.")
|
||||||
|
|
||||||
@Command('bootstrap-rust-docs',
|
@Command('bootstrap-rust-docs',
|
||||||
|
@ -149,7 +176,7 @@ class MachCommands(CommandBase):
|
||||||
self.ensure_bootstrapped()
|
self.ensure_bootstrapped()
|
||||||
hash_dir = path.join(self.context.sharedir, "rust",
|
hash_dir = path.join(self.context.sharedir, "rust",
|
||||||
self.rust_snapshot_path().split("/")[0])
|
self.rust_snapshot_path().split("/")[0])
|
||||||
docs_dir = path.join(hash_dir, self.rust_snapshot_path().split("/")[1], "doc")
|
docs_dir = path.join(hash_dir, "doc")
|
||||||
if not force and path.exists(docs_dir):
|
if not force and path.exists(docs_dir):
|
||||||
print("Snapshot Rust docs already downloaded.", end=" ")
|
print("Snapshot Rust docs already downloaded.", end=" ")
|
||||||
print("Use |bootstrap-rust-docs --force| to download again.")
|
print("Use |bootstrap-rust-docs --force| to download again.")
|
||||||
|
@ -158,8 +185,8 @@ class MachCommands(CommandBase):
|
||||||
if path.isdir(docs_dir):
|
if path.isdir(docs_dir):
|
||||||
shutil.rmtree(docs_dir)
|
shutil.rmtree(docs_dir)
|
||||||
docs_name = self.rust_snapshot_path().replace("rustc-", "rust-docs-")
|
docs_name = self.rust_snapshot_path().replace("rustc-", "rust-docs-")
|
||||||
snapshot_url = ("https://servo-rust.s3.amazonaws.com/%s.tar.gz"
|
snapshot_url = ("https://static-rust-lang-org.s3.amazonaws.com/dist/rust-docs-nightly-%s.tar.gz"
|
||||||
% docs_name)
|
% host_triple())
|
||||||
tgz_file = path.join(hash_dir, 'doc.tar.gz')
|
tgz_file = path.join(hash_dir, 'doc.tar.gz')
|
||||||
|
|
||||||
download_file("Rust docs", snapshot_url, tgz_file)
|
download_file("Rust docs", snapshot_url, tgz_file)
|
||||||
|
|
|
@ -97,7 +97,7 @@ class CommandBase(object):
|
||||||
self.config["tools"].setdefault("cargo-root", "")
|
self.config["tools"].setdefault("cargo-root", "")
|
||||||
if not self.config["tools"]["system-rust"]:
|
if not self.config["tools"]["system-rust"]:
|
||||||
self.config["tools"]["rust-root"] = path.join(
|
self.config["tools"]["rust-root"] = path.join(
|
||||||
context.sharedir, "rust", *self.rust_snapshot_path().split("/"))
|
context.sharedir, "rust", self.rust_snapshot_path())
|
||||||
if not self.config["tools"]["system-cargo"]:
|
if not self.config["tools"]["system-cargo"]:
|
||||||
self.config["tools"]["cargo-root"] = path.join(
|
self.config["tools"]["cargo-root"] = path.join(
|
||||||
context.sharedir, "cargo", self.cargo_build_id())
|
context.sharedir, "cargo", self.cargo_build_id())
|
||||||
|
@ -127,7 +127,8 @@ class CommandBase(object):
|
||||||
filename = path.join(self.context.topdir, "rust-snapshot-hash")
|
filename = path.join(self.context.topdir, "rust-snapshot-hash")
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
snapshot_hash = f.read().strip()
|
snapshot_hash = f.read().strip()
|
||||||
self._rust_snapshot_path = "%s-%s" % (snapshot_hash, host_triple())
|
self._rust_snapshot_path = ("%s/rustc-nightly-%s" %
|
||||||
|
(snapshot_hash, host_triple()))
|
||||||
return self._rust_snapshot_path
|
return self._rust_snapshot_path
|
||||||
|
|
||||||
def cargo_build_id(self):
|
def cargo_build_id(self):
|
||||||
|
@ -337,6 +338,8 @@ class CommandBase(object):
|
||||||
if not self.config["tools"]["system-rust"] and \
|
if not self.config["tools"]["system-rust"] and \
|
||||||
not path.exists(path.join(
|
not path.exists(path.join(
|
||||||
self.config["tools"]["rust-root"], "rustc", "bin", "rustc")):
|
self.config["tools"]["rust-root"], "rustc", "bin", "rustc")):
|
||||||
|
print("looking for rustc at %s" % path.join(
|
||||||
|
self.config["tools"]["rust-root"], "rustc", "bin", "rustc"))
|
||||||
Registrar.dispatch("bootstrap-rust", context=self.context)
|
Registrar.dispatch("bootstrap-rust", context=self.context)
|
||||||
if not self.config["tools"]["system-cargo"] and \
|
if not self.config["tools"]["system-cargo"] and \
|
||||||
not path.exists(path.join(
|
not path.exists(path.join(
|
||||||
|
|
|
@ -164,7 +164,7 @@ def check_lock(file_name, contents):
|
||||||
packages = {}
|
packages = {}
|
||||||
|
|
||||||
# package names to be neglected (as named by cargo)
|
# package names to be neglected (as named by cargo)
|
||||||
exceptions = []
|
exceptions = ["libc"]
|
||||||
|
|
||||||
while idx < len(contents):
|
while idx < len(contents):
|
||||||
content = contents[idx].strip()
|
content = contents[idx].strip()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
168a23ebe1729386138fa71643382fdd64fac205/rustc-1.5.0-dev
|
2015-11-13
|
||||||
|
|
3
tests/reftest.rs
vendored
3
tests/reftest.rs
vendored
|
@ -8,7 +8,6 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(fs_walk)]
|
#![feature(fs_walk)]
|
||||||
#![feature(path_ext)]
|
|
||||||
#![feature(slice_patterns)]
|
#![feature(slice_patterns)]
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
|
@ -21,7 +20,7 @@ extern crate util;
|
||||||
use image::{DynamicImage, GenericImage, ImageFormat, RgbImage};
|
use image::{DynamicImage, GenericImage, ImageFormat, RgbImage};
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::fs::{PathExt, File, walk_dir};
|
use std::fs::{File, walk_dir};
|
||||||
use std::io::{self, Read, Result, Write};
|
use std::io::{self, Read, Result, Write};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
|
@ -30,8 +30,8 @@ path = "../../../components/devtools_traits"
|
||||||
git = "https://github.com/servo/ipc-channel"
|
git = "https://github.com/servo/ipc-channel"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cookie = "0.1"
|
cookie = "0.2"
|
||||||
hyper = "0.6"
|
hyper = "0.7"
|
||||||
url = "0.2"
|
url = "0.5"
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
flate2 = "0.2.0"
|
flate2 = "0.2.0"
|
||||||
|
|
|
@ -11,5 +11,5 @@ doctest = false
|
||||||
[dependencies.plugins]
|
[dependencies.plugins]
|
||||||
path = "../../../components/plugins"
|
path = "../../../components/plugins"
|
||||||
|
|
||||||
[dependencies.url]
|
[dependencies]
|
||||||
version = "0.2.36"
|
url = "0.5"
|
||||||
|
|
|
@ -22,7 +22,7 @@ path = "../../../components/util"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
url = "0.2"
|
url = "0.5"
|
||||||
cssparser = "0.4"
|
cssparser = "0.4"
|
||||||
selectors = "0.2"
|
selectors = "0.2"
|
||||||
string_cache = "0.2"
|
string_cache = "0.2"
|
||||||
|
|
|
@ -17,6 +17,6 @@ path = "../../../components/plugins"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
app_units = {version = "0.1", features = ["plugins"]}
|
app_units = {version = "0.1", features = ["plugins"]}
|
||||||
libc = "0.1"
|
libc = "0.2"
|
||||||
euclid = {version = "0.3", features = ["plugins"]}
|
euclid = {version = "0.3", features = ["plugins"]}
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,6 @@ fn test_heap_size() {
|
||||||
// An ascii string with 16 chars is 16 bytes in UTF-8.
|
// An ascii string with 16 chars is 16 bytes in UTF-8.
|
||||||
assert_eq!(String::from("0123456789abcdef").heap_size_of_children(), 16);
|
assert_eq!(String::from("0123456789abcdef").heap_size_of_children(), 16);
|
||||||
|
|
||||||
// … but RawVec::reserve gives twice the requested capacity.
|
|
||||||
let mut x = String::new();
|
|
||||||
x.push_str("0123456789abcdef");
|
|
||||||
assert_eq!(x.heap_size_of_children(), 32);
|
|
||||||
|
|
||||||
// Not on the heap.
|
// Not on the heap.
|
||||||
let x: Option<i32> = None;
|
let x: Option<i32> = None;
|
||||||
assert_eq!(x.heap_size_of_children(), 0);
|
assert_eq!(x.heap_size_of_children(), 0);
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
[Parsing: <data:test# »> against <about:blank>]
|
[Parsing: <data:test# »> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://192.0x00A80001> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://GOOgoo.com> against <http://other.com/>]
|
[Parsing: <http://GOOgoo.com> against <http://other.com/>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -27,12 +24,6 @@
|
||||||
[Parsing: <http://你好你好> against <http://other.com/>]
|
[Parsing: <http://你好你好> against <http://other.com/>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://192.168.0.257> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://0Xc0.0250.01> against <http://other.com/>]
|
[Parsing: <http://0Xc0.0250.01> against <http://other.com/>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -173,7 +164,3 @@
|
||||||
|
|
||||||
[Parsing: <sc://ñ.test/> against <about:blank>]
|
[Parsing: <sc://ñ.test/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue