servo: Merge #11221 - Add file backend support for Blob and related (from izgzhen:blob-file-backend); r=Manishearth

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes fix #10851, related to #11131
- [x] These changes do not require tests because the implementation is partial and can't work alone

1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends
2. Rewrite most interfaces of `Blob` to accommodate the change
3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached

The design is still immature, welcome comments!

- [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound?
- [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d7b17681dc9c20358fda9efc72575feb968cc81
This commit is contained in:
Zhen Zhang 2016-06-01 05:09:21 -05:00
Родитель 6f276c2985
Коммит 7a309c887c
18 изменённых файлов: 253 добавлений и 152 удалений

Просмотреть файл

@ -8,9 +8,9 @@
use dom::bindings::js::JS;
use dom::document::Document;
use msg::constellation_msg::PipelineId;
use net_traits::{PendingAsyncLoad, CoreResourceThread, LoadContext};
use net_traits::{PendingAsyncLoad, LoadContext};
use net_traits::{RequestSource, AsyncResponseTarget};
use std::sync::Arc;
use net_traits::{ResourceThreads, IpcSend};
use std::thread;
use url::Url;
@ -93,10 +93,7 @@ impl Drop for LoadBlocker {
#[derive(JSTraceable, HeapSizeOf)]
pub struct DocumentLoader {
/// We use an `Arc<CoreResourceThread>` here in order to avoid file descriptor exhaustion when there
/// are lots of iframes.
#[ignore_heap_size_of = "channels are hard"]
pub resource_thread: Arc<CoreResourceThread>,
resource_threads: ResourceThreads,
pipeline: Option<PipelineId>,
blocking_loads: Vec<LoadType>,
events_inhibited: bool,
@ -104,19 +101,16 @@ pub struct DocumentLoader {
impl DocumentLoader {
pub fn new(existing: &DocumentLoader) -> DocumentLoader {
DocumentLoader::new_with_thread(existing.resource_thread.clone(), None, None)
DocumentLoader::new_with_threads(existing.resource_threads.clone(), None, None)
}
/// We use an `Arc<CoreResourceThread>` here in order to avoid file descriptor exhaustion when there
/// are lots of iframes.
pub fn new_with_thread(resource_thread: Arc<CoreResourceThread>,
pipeline: Option<PipelineId>,
initial_load: Option<Url>)
-> DocumentLoader {
pub fn new_with_threads(resource_threads: ResourceThreads,
pipeline: Option<PipelineId>,
initial_load: Option<Url>) -> DocumentLoader {
let initial_loads = initial_load.into_iter().map(LoadType::PageSource).collect();
DocumentLoader {
resource_thread: resource_thread,
resource_threads: resource_threads,
pipeline: pipeline,
blocking_loads: initial_loads,
events_inhibited: false,
@ -138,7 +132,7 @@ impl DocumentLoader {
self.add_blocking_load(load);
let client_chan = referrer.window().custom_message_chan();
PendingAsyncLoad::new(context,
(*self.resource_thread).clone(),
self.resource_threads.sender(),
url,
self.pipeline,
referrer.get_referrer_policy(),
@ -169,7 +163,12 @@ impl DocumentLoader {
pub fn inhibit_events(&mut self) {
self.events_inhibited = true;
}
pub fn events_inhibited(&self) -> bool {
self.events_inhibited
}
pub fn resource_threads(&self) -> &ResourceThreads {
&self.resource_threads
}
}

Просмотреть файл

@ -19,7 +19,8 @@ use js::jsapi::{CurrentGlobalOrNull, GetGlobalForObjectCrossCompartment};
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
use msg::constellation_msg::{PipelineId, PanicMsg};
use net_traits::{CoreResourceThread, RequestSource};
use net_traits::filemanager_thread::FileManagerThreadMsg;
use net_traits::{ResourceThreads, CoreResourceThread, RequestSource, IpcSend};
use profile_traits::{mem, time};
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
use script_thread::{MainThreadScriptChan, ScriptThread};
@ -122,19 +123,29 @@ impl<'a> GlobalRef<'a> {
}
}
/// Get the `CoreResourceThread` for this global scope.
pub fn core_resource_thread(&self) -> CoreResourceThread {
/// Get the `ResourceThreads` for this global scope.
pub fn resource_threads(&self) -> ResourceThreads {
match *self {
GlobalRef::Window(ref window) => {
let doc = window.Document();
let doc = doc.r();
let loader = doc.loader();
(*loader.resource_thread).clone()
loader.resource_threads().clone()
}
GlobalRef::Worker(ref worker) => worker.core_resource_thread().clone(),
GlobalRef::Worker(ref worker) => worker.resource_threads().clone(),
}
}
/// Get the `CoreResourceThread` for this global scope
pub fn core_resource_thread(&self) -> CoreResourceThread {
self.resource_threads().sender()
}
/// Get the port to file manager for this global scope
pub fn filemanager_thread(&self) -> IpcSender<FileManagerThreadMsg> {
self.resource_threads().sender()
}
/// Get the worker's id.
pub fn get_worker_id(&self) -> Option<WorkerId> {
match *self {

Просмотреть файл

@ -2,22 +2,26 @@
* 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/. */
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::BlobBinding;
use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
use dom::bindings::codegen::UnionTypes::BlobOrString;
use dom::bindings::error::Fallible;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::str::DOMString;
use encoding::all::UTF_8;
use encoding::types::{EncoderTrap, Encoding};
use ipc_channel::ipc;
use net_traits::filemanager_thread::FileManagerThreadMsg;
use num_traits::ToPrimitive;
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::Cell;
use std::cmp::{max, min};
use std::sync::Arc;
use uuid::Uuid;
#[derive(Clone, JSTraceable)]
pub struct DataSlice {
@ -62,6 +66,11 @@ impl DataSlice {
}
}
/// Construct data slice from a vector of bytes
pub fn from_bytes(bytes: Vec<u8>) -> DataSlice {
DataSlice::new(Arc::new(bytes), None, None)
}
/// Construct an empty data slice
pub fn empty() -> DataSlice {
DataSlice {
@ -83,26 +92,51 @@ impl DataSlice {
}
#[derive(Clone, JSTraceable)]
pub enum BlobImpl {
/// File-based, cached backend
File(Uuid, DOMRefCell<Option<DataSlice>>),
/// Memory-based backend
Memory(DataSlice),
}
impl BlobImpl {
/// Construct memory-backed BlobImpl from DataSlice
pub fn new_from_slice(slice: DataSlice) -> BlobImpl {
BlobImpl::Memory(slice)
}
/// Construct file-backed BlobImpl from File ID
pub fn new_from_file(file_id: Uuid) -> BlobImpl {
BlobImpl::File(file_id, DOMRefCell::new(None))
}
/// Construct empty, memory-backed BlobImpl
pub fn new_from_empty_slice() -> BlobImpl {
BlobImpl::new_from_slice(DataSlice::empty())
}
}
// https://w3c.github.io/FileAPI/#blob
#[dom_struct]
pub struct Blob {
reflector_: Reflector,
#[ignore_heap_size_of = "No clear owner"]
data: DataSlice,
blob_impl: BlobImpl,
typeString: String,
isClosed_: Cell<bool>,
}
impl Blob {
pub fn new(global: GlobalRef, slice: DataSlice, typeString: &str) -> Root<Blob> {
let boxed_blob = box Blob::new_inherited(slice, typeString);
pub fn new(global: GlobalRef, blob_impl: BlobImpl, typeString: &str) -> Root<Blob> {
let boxed_blob = box Blob::new_inherited(blob_impl, typeString);
reflect_dom_object(boxed_blob, global, BlobBinding::Wrap)
}
pub fn new_inherited(slice: DataSlice, typeString: &str) -> Blob {
pub fn new_inherited(blob_impl: BlobImpl, typeString: &str) -> Blob {
Blob {
reflector_: Reflector::new(),
data: slice,
blob_impl: blob_impl,
typeString: typeString.to_owned(),
isClosed_: Cell::new(false),
}
@ -116,35 +150,81 @@ impl Blob {
// TODO: accept other blobParts types - ArrayBuffer or ArrayBufferView
let bytes: Vec<u8> = match blobParts {
None => Vec::new(),
Some(blobparts) => blob_parts_to_bytes(blobparts),
Some(blobparts) => match blob_parts_to_bytes(blobparts) {
Ok(bytes) => bytes,
Err(_) => return Err(Error::InvalidCharacter),
}
};
let slice = DataSlice::new(Arc::new(bytes), None, None);
Ok(Blob::new(global, slice, &blobPropertyBag.get_typestring()))
let slice = DataSlice::from_bytes(bytes);
Ok(Blob::new(global, BlobImpl::new_from_slice(slice), &blobPropertyBag.get_typestring()))
}
pub fn get_data(&self) -> &DataSlice {
&self.data
/// Get a slice to inner data, this might incur synchronous read and caching
pub fn get_slice(&self) -> Result<DataSlice, ()> {
match self.blob_impl {
BlobImpl::File(ref id, ref slice) => {
match *slice.borrow() {
Some(ref s) => Ok(s.clone()),
None => {
let global = self.global();
let s = read_file(global.r(), id.clone())?;
*slice.borrow_mut() = Some(s.clone()); // Cached
Ok(s)
}
}
}
BlobImpl::Memory(ref s) => Ok(s.clone())
}
}
/// Try to get a slice, and if any exception happens, return the empty slice
pub fn get_slice_or_empty(&self) -> DataSlice {
self.get_slice().unwrap_or(DataSlice::empty())
}
}
pub fn blob_parts_to_bytes(blobparts: Vec<BlobOrString>) -> Vec<u8> {
blobparts.iter().flat_map(|blobpart| {
match blobpart {
&BlobOrString::String(ref s) => {
UTF_8.encode(s, EncoderTrap::Replace).unwrap()
},
&BlobOrString::Blob(ref b) => {
b.get_data().get_bytes().to_vec()
},
}
}).collect::<Vec<u8>>()
fn read_file(global: GlobalRef, id: Uuid) -> Result<DataSlice, ()> {
let file_manager = global.filemanager_thread();
let (chan, recv) = ipc::channel().map_err(|_|())?;
let _ = file_manager.send(FileManagerThreadMsg::ReadFile(chan, id));
let result = match recv.recv() {
Ok(ret) => ret,
Err(e) => {
debug!("File manager thread has problem {:?}", e);
return Err(())
}
};
let bytes = result.map_err(|_|())?;
Ok(DataSlice::from_bytes(bytes))
}
/// Extract bytes from BlobParts, used by Blob and File constructor
/// https://w3c.github.io/FileAPI/#constructorBlob
pub fn blob_parts_to_bytes(blobparts: Vec<BlobOrString>) -> Result<Vec<u8>, ()> {
let mut ret = vec![];
for blobpart in &blobparts {
match blobpart {
&BlobOrString::String(ref s) => {
let mut bytes = UTF_8.encode(s, EncoderTrap::Replace).map_err(|_|())?;
ret.append(&mut bytes);
},
&BlobOrString::Blob(ref b) => {
ret.append(&mut b.get_slice_or_empty().bytes.to_vec());
},
}
}
Ok(ret)
}
impl BlobMethods for Blob {
// https://w3c.github.io/FileAPI/#dfn-size
fn Size(&self) -> u64 {
self.data.size()
self.get_slice_or_empty().size()
}
// https://w3c.github.io/FileAPI/#dfn-type
@ -169,9 +249,11 @@ impl BlobMethods for Blob {
}
}
};
let global = self.global();
let bytes = self.data.bytes.clone();
Blob::new(global.r(), DataSlice::new(bytes, start, end), &relativeContentType)
let bytes = self.get_slice_or_empty().bytes.clone();
let slice = DataSlice::new(bytes, start, end);
Blob::new(global.r(), BlobImpl::new_from_slice(slice), &relativeContentType)
}
// https://w3c.github.io/FileAPI/#dfn-isClosed
@ -196,6 +278,8 @@ impl BlobMethods for Blob {
impl BlobBinding::BlobPropertyBag {
/// Get the normalized inner type string
/// https://w3c.github.io/FileAPI/#dfn-type
pub fn get_typestring(&self) -> String {
if is_ascii_printable(&self.type_) {
self.type_.to_lowercase()

Просмотреть файл

@ -28,7 +28,7 @@ use js::jsapi::{JSAutoCompartment, JSContext, RootedValue};
use js::jsval::UndefinedValue;
use js::rust::Runtime;
use msg::constellation_msg::PipelineId;
use net_traits::{LoadContext, load_whole_resource, CustomResponse};
use net_traits::{LoadContext, load_whole_resource, CustomResponse, IpcSend};
use rand::random;
use script_runtime::ScriptThreadEventCategory::WorkerEvent;
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, StackRootTLS, get_reports, new_rt_and_cx};
@ -226,7 +226,7 @@ impl DedicatedWorkerGlobalScope {
let roots = RootCollection::new();
let _stack_roots_tls = StackRootTLS::new(&roots);
let (url, source) = match load_whole_resource(LoadContext::Script,
&init.core_resource_thread,
&init.resource_threads.sender(),
worker_url,
&worker_load_origin) {
Err(_) => {

Просмотреть файл

@ -5,15 +5,14 @@
use dom::bindings::codegen::Bindings::FileBinding;
use dom::bindings::codegen::Bindings::FileBinding::FileMethods;
use dom::bindings::codegen::UnionTypes::BlobOrString;
use dom::bindings::error::Fallible;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::global::GlobalRef;
use dom::bindings::js::Root;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::str::DOMString;
use dom::blob::{Blob, DataSlice, blob_parts_to_bytes};
use dom::blob::{Blob, BlobImpl, DataSlice, blob_parts_to_bytes};
use dom::window::Window;
use net_traits::filemanager_thread::SelectedFile;
use std::sync::Arc;
use time;
#[dom_struct]
@ -24,10 +23,10 @@ pub struct File {
}
impl File {
fn new_inherited(slice: DataSlice, name: DOMString,
fn new_inherited(blob_impl: BlobImpl, name: DOMString,
modified: Option<i64>, typeString: &str) -> File {
File {
blob: Blob::new_inherited(slice, typeString),
blob: Blob::new_inherited(blob_impl, typeString),
name: name,
// https://w3c.github.io/FileAPI/#dfn-lastModified
modified: match modified {
@ -40,9 +39,9 @@ impl File {
}
}
pub fn new(global: GlobalRef, slice: DataSlice,
pub fn new(global: GlobalRef, blob_impl: BlobImpl,
name: DOMString, modified: Option<i64>, typeString: &str) -> Root<File> {
reflect_dom_object(box File::new_inherited(slice, name, modified, typeString),
reflect_dom_object(box File::new_inherited(blob_impl, name, modified, typeString),
global,
FileBinding::Wrap)
}
@ -51,11 +50,9 @@ impl File {
pub fn new_from_selected(window: &Window, selected: SelectedFile) -> Root<File> {
let name = DOMString::from(selected.filename.to_str().expect("File name encoding error"));
let slice = DataSlice::empty();
let global = GlobalRef::Window(window);
File::new(global, slice, name, Some(selected.modified as i64), "")
File::new(global, BlobImpl::new_from_file(selected.id), name, Some(selected.modified as i64), "")
}
// https://w3c.github.io/FileAPI/#file-constructor
@ -64,14 +61,17 @@ impl File {
filename: DOMString,
filePropertyBag: &FileBinding::FilePropertyBag)
-> Fallible<Root<File>> {
let bytes: Vec<u8> = blob_parts_to_bytes(fileBits);
let bytes: Vec<u8> = match blob_parts_to_bytes(fileBits) {
Ok(bytes) => bytes,
Err(_) => return Err(Error::InvalidCharacter),
};
let ref blobPropertyBag = filePropertyBag.parent;
let typeString = blobPropertyBag.get_typestring();
let slice = DataSlice::new(Arc::new(bytes), None, None);
let slice = DataSlice::from_bytes(bytes);
let modified = filePropertyBag.lastModified;
Ok(File::new(global, slice, filename, modified, &typeString))
Ok(File::new(global, BlobImpl::new_from_slice(slice), filename, modified, &typeString))
}
pub fn name(&self) -> &DOMString {

Просмотреть файл

@ -349,7 +349,7 @@ impl FileReader {
self.change_ready_state(FileReaderReadyState::Loading);
// Step 4
let blob_contents = blob.get_data().clone();
let blob_contents = blob.get_slice_or_empty();
let type_ = blob.Type();

Просмотреть файл

@ -11,7 +11,7 @@ use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, Root};
use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::str::{DOMString, USVString};
use dom::blob::Blob;
use dom::blob::{Blob, BlobImpl};
use dom::file::File;
use dom::htmlformelement::HTMLFormElement;
use std::collections::HashMap;
@ -121,14 +121,15 @@ impl FormDataMethods for FormData {
impl FormData {
fn get_file_or_blob(&self, value: &Blob, filename: Option<USVString>) -> Root<Blob> {
fn get_file_or_blob(&self, blob: &Blob, filename: Option<USVString>) -> Root<Blob> {
match filename {
Some(fname) => {
let global = self.global();
let name = DOMString::from(fname.0);
Root::upcast(File::new(global.r(), value.get_data().clone(), name, None, ""))
let slice = blob.get_slice_or_empty();
Root::upcast(File::new(global.r(), BlobImpl::new_from_slice(slice), name, None, ""))
}
None => Root::from_ref(value)
None => Root::from_ref(blob)
}
}
}

Просмотреть файл

@ -40,6 +40,7 @@ use dom::window::Window;
use encoding::EncodingRef;
use encoding::all::UTF_8;
use encoding::label::encoding_from_whatwg_label;
use encoding::types::DecoderTrap;
use hyper::header::{Charset, ContentDisposition, ContentType, DispositionParam, DispositionType};
use hyper::method::Method;
use msg::constellation_msg::{LoadData, PipelineId};
@ -47,7 +48,6 @@ use rand::random;
use script_thread::{MainThreadScriptMsg, Runnable};
use std::borrow::ToOwned;
use std::cell::Cell;
use std::str::from_utf8;
use std::sync::mpsc::Sender;
use string_cache::Atom;
use task_source::dom_manipulation::DOMManipulationTask;
@ -281,7 +281,7 @@ impl HTMLFormElement {
let encoding = encoding.unwrap_or(self.pick_encoding());
// Step 3
let charset = &*encoding.whatwg_name().unwrap();
let charset = &*encoding.whatwg_name().unwrap_or("UTF-8");
// Step 4
for entry in form_data.iter_mut() {
@ -309,12 +309,18 @@ impl HTMLFormElement {
DispositionParam::Filename(Charset::Ext(String::from(charset.clone())),
None,
f.name().clone().into()));
let content_type = ContentType(f.upcast::<Blob>().Type().parse().unwrap());
// https://tools.ietf.org/html/rfc7578#section-4.4
let content_type = ContentType(f.upcast::<Blob>().Type()
.parse().unwrap_or(mime!(Text / Plain)));
result.push_str(&*format!("Content-Disposition: {}\r\n{}\r\n\r\n",
content_disposition,
content_type));
result.push_str(from_utf8(&f.upcast::<Blob>().get_data().get_bytes()).unwrap());
let slice = f.upcast::<Blob>().get_slice_or_empty();
let decoded = encoding.decode(&slice.get_bytes(), DecoderTrap::Replace)
.expect("Invalid encoding in file");
result.push_str(&decoded);
}
}
}

Просмотреть файл

@ -22,7 +22,7 @@ use dom::bindings::num::Finite;
use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::str::{ByteString, DOMString, USVString};
use dom::bindings::weakref::MutableWeakRef;
use dom::blob::{Blob, DataSlice};
use dom::blob::{Blob, BlobImpl};
use dom::url::URL;
use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject};
use js::jsval::{JSVal, NullValue};
@ -101,7 +101,7 @@ impl TestBindingMethods for TestBinding {
fn EnumAttribute(&self) -> TestEnum { TestEnum::_empty }
fn SetEnumAttribute(&self, _: TestEnum) {}
fn InterfaceAttribute(&self) -> Root<Blob> {
Blob::new(self.global().r(), DataSlice::empty(), "")
Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")
}
fn SetInterfaceAttribute(&self, _: &Blob) {}
fn UnionAttribute(&self) -> HTMLElementOrLong { HTMLElementOrLong::Long(0) }
@ -179,7 +179,7 @@ impl TestBindingMethods for TestBinding {
fn SetAttr_to_automatically_rename(&self, _: DOMString) {}
fn GetEnumAttributeNullable(&self) -> Option<TestEnum> { Some(TestEnum::_empty) }
fn GetInterfaceAttributeNullable(&self) -> Option<Root<Blob>> {
Some(Blob::new(self.global().r(), DataSlice::empty(), ""))
Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), ""))
}
fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {}
fn GetInterfaceAttributeWeak(&self) -> Option<Root<URL>> {
@ -230,7 +230,7 @@ impl TestBindingMethods for TestBinding {
fn ReceiveByteString(&self) -> ByteString { ByteString::new(vec!()) }
fn ReceiveEnum(&self) -> TestEnum { TestEnum::_empty }
fn ReceiveInterface(&self) -> Root<Blob> {
Blob::new(self.global().r(), DataSlice::empty(), "")
Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")
}
fn ReceiveAny(&self, _: *mut JSContext) -> JSVal { NullValue() }
fn ReceiveObject(&self, _: *mut JSContext) -> *mut JSObject { panic!() }
@ -247,7 +247,7 @@ impl TestBindingMethods for TestBinding {
}
fn ReceiveSequence(&self) -> Vec<i32> { vec![1] }
fn ReceiveInterfaceSequence(&self) -> Vec<Root<Blob>> {
vec![Blob::new(self.global().r(), DataSlice::empty(), "")]
vec![Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")]
}
fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) }
@ -268,7 +268,7 @@ impl TestBindingMethods for TestBinding {
fn ReceiveNullableByteString(&self) -> Option<ByteString> { Some(ByteString::new(vec!())) }
fn ReceiveNullableEnum(&self) -> Option<TestEnum> { Some(TestEnum::_empty) }
fn ReceiveNullableInterface(&self) -> Option<Root<Blob>> {
Some(Blob::new(self.global().r(), DataSlice::empty(), ""))
Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), ""))
}
fn ReceiveNullableObject(&self, _: *mut JSContext) -> *mut JSObject { ptr::null_mut() }
fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> {

Просмотреть файл

@ -16,7 +16,7 @@ use dom::bindings::js::Root;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{Reflectable, reflect_dom_object};
use dom::bindings::str::{DOMString, USVString, is_token};
use dom::blob::{Blob, DataSlice};
use dom::blob::{Blob, BlobImpl, DataSlice};
use dom::closeevent::CloseEvent;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
@ -40,7 +40,6 @@ use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::Cell;
use std::ptr;
use std::sync::Arc;
use std::thread;
use websocket::client::request::Url;
use websocket::header::{Headers, WebSocketProtocol};
@ -406,7 +405,7 @@ impl WebSocketMethods for WebSocket {
if send_data {
let mut other_sender = self.sender.borrow_mut();
let my_sender = other_sender.as_mut().unwrap();
let bytes = blob.get_data().get_bytes().to_vec();
let bytes = blob.get_slice_or_empty().get_bytes().to_vec();
let _ = my_sender.send(WebSocketDomAction::SendMessage(MessageData::Binary(bytes)));
}
@ -592,8 +591,8 @@ impl Runnable for MessageReceivedTask {
MessageData::Binary(data) => {
match ws.binary_type.get() {
BinaryType::Blob => {
let slice = DataSlice::new(Arc::new(data), None, None);
let blob = Blob::new(global.r(), slice, "");
let slice = DataSlice::from_bytes(data);
let blob = Blob::new(global.r(), BlobImpl::new_from_slice(slice), "");
blob.to_jsval(cx, message.handle_mut());
}
BinaryType::Arraybuffer => {

Просмотреть файл

@ -99,7 +99,7 @@ impl Worker {
Err(_) => return Err(Error::Syntax),
};
let core_resource_thread = global.core_resource_thread();
let resource_threads = global.resource_threads();
let constellation_chan = global.constellation_chan().clone();
let scheduler_chan = global.scheduler_chan().clone();
@ -134,7 +134,7 @@ impl Worker {
};
let init = WorkerGlobalScopeInit {
core_resource_thread: core_resource_thread,
resource_threads: resource_threads,
mem_profiler_chan: global.mem_profiler_chan().clone(),
time_profiler_chan: global.time_profiler_chan().clone(),
to_devtools_sender: global.devtools_chan(),

Просмотреть файл

@ -24,7 +24,8 @@ use js::jsapi::{HandleValue, JSContext, JSRuntime, RootedValue};
use js::jsval::UndefinedValue;
use js::rust::Runtime;
use msg::constellation_msg::{PipelineId, ReferrerPolicy, PanicMsg};
use net_traits::{LoadContext, CoreResourceThread, load_whole_resource, RequestSource, LoadOrigin, CustomResponseSender};
use net_traits::{LoadContext, ResourceThreads, load_whole_resource};
use net_traits::{RequestSource, LoadOrigin, CustomResponseSender, IpcSend};
use profile_traits::{mem, time};
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
use script_traits::ScriptMsg as ConstellationMsg;
@ -44,7 +45,7 @@ pub enum WorkerGlobalScopeTypeId {
}
pub struct WorkerGlobalScopeInit {
pub core_resource_thread: CoreResourceThread,
pub resource_threads: ResourceThreads,
pub mem_profiler_chan: mem::ProfilerChan,
pub time_profiler_chan: time::ProfilerChan,
pub to_devtools_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
@ -67,7 +68,7 @@ pub struct WorkerGlobalScope {
runtime: Runtime,
next_worker_id: Cell<WorkerId>,
#[ignore_heap_size_of = "Defined in std"]
core_resource_thread: CoreResourceThread,
resource_threads: ResourceThreads,
location: MutNullableHeap<JS<WorkerLocation>>,
navigator: MutNullableHeap<JS<WorkerNavigator>>,
console: MutNullableHeap<JS<Console>>,
@ -126,7 +127,7 @@ impl WorkerGlobalScope {
worker_url: worker_url,
closing: init.closing,
runtime: runtime,
core_resource_thread: init.core_resource_thread,
resource_threads: init.resource_threads,
location: Default::default(),
navigator: Default::default(),
console: Default::default(),
@ -204,8 +205,8 @@ impl WorkerGlobalScope {
self.closing.load(Ordering::SeqCst)
}
pub fn core_resource_thread(&self) -> &CoreResourceThread {
&self.core_resource_thread
pub fn resource_threads(&self) -> &ResourceThreads {
&self.resource_threads
}
pub fn get_url(&self) -> &Url {
@ -269,7 +270,10 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
let mut rval = RootedValue::new(self.runtime.cx(), UndefinedValue());
for url in urls {
let (url, source) = match load_whole_resource(LoadContext::Script, &self.core_resource_thread, url, self) {
let (url, source) = match load_whole_resource(LoadContext::Script,
&self.resource_threads.sender(),
url,
self) {
Err(_) => return Err(Error::Network),
Ok((metadata, bytes)) => {
(metadata.final_url, String::from_utf8(bytes).unwrap())

Просмотреть файл

@ -22,7 +22,7 @@ use dom::bindings::js::{Root, RootedReference};
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::{Reflectable, reflect_dom_object};
use dom::bindings::str::{ByteString, DOMString, USVString, is_token};
use dom::blob::{Blob, DataSlice};
use dom::blob::{Blob, DataSlice, BlobImpl};
use dom::document::DocumentSource;
use dom::document::{Document, IsHTMLDocument};
use dom::event::{Event, EventBubbles, EventCancelable};
@ -1134,8 +1134,8 @@ impl XMLHttpRequest {
let mime = self.final_mime_type().as_ref().map(Mime::to_string).unwrap_or("".to_owned());
// Step 3, 4
let slice = DataSlice::new(Arc::new(self.response.borrow().to_vec()), None, None);
let blob = Blob::new(self.global().r(), slice, &mime);
let slice = DataSlice::from_bytes(self.response.borrow().to_vec());
let blob = Blob::new(self.global().r(), BlobImpl::new_from_slice(slice), &mime);
self.response_blob.set(Some(blob.r()));
blob
}
@ -1419,13 +1419,12 @@ impl Extractable for BodyInit {
Some(DOMString::from("application/x-www-form-urlencoded;charset=UTF-8")))
},
BodyInit::Blob(ref b) => {
let data = b.get_data();
let content_type = if b.Type().as_ref().is_empty() {
None
} else {
Some(b.Type())
};
(data.get_bytes().to_vec(), content_type)
(b.get_slice_or_empty().get_bytes().to_vec(), content_type)
},
}
}

Просмотреть файл

@ -19,6 +19,7 @@
#![feature(plugin)]
#![feature(slice_patterns)]
#![feature(stmt_expr_attributes)]
#![feature(question_mark)]
#![deny(unsafe_code)]
#![allow(non_snake_case)]

Просмотреть файл

@ -1573,9 +1573,9 @@ impl ScriptThread {
}
});
let loader = DocumentLoader::new_with_thread(Arc::new(self.resource_threads.sender()),
Some(browsing_context.pipeline()),
Some(incomplete.url.clone()));
let loader = DocumentLoader::new_with_threads(self.resource_threads.clone(),
Some(browsing_context.pipeline()),
Some(incomplete.url.clone()));
let is_html_document = match metadata.content_type {
Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) |

53
servo/components/servo/Cargo.lock сгенерированный
Просмотреть файл

@ -19,7 +19,7 @@ dependencies = [
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin_app 0.0.1",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout 0.0.1",
"layout_tests 0.0.1",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -191,7 +191,7 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -210,7 +210,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"plugins 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -313,7 +313,7 @@ dependencies = [
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@ -344,7 +344,7 @@ dependencies = [
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -487,7 +487,7 @@ version = "0.0.1"
dependencies = [
"devtools_traits 0.0.1",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"plugins 0.0.1",
@ -506,7 +506,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -765,7 +765,7 @@ dependencies = [
"harfbuzz-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -800,7 +800,7 @@ name = "gfx_tests"
version = "0.0.1"
dependencies = [
"gfx 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"style 0.0.1",
]
@ -1052,11 +1052,10 @@ dependencies = [
[[package]]
name = "ipc-channel"
version = "0.2.2"
source = "git+https://github.com/servo/ipc-channel#10bed82904d635b2ff6a916872130868cb69b104"
version = "0.2.3"
source = "git+https://github.com/servo/ipc-channel#48137d69955f5460da586c552de275ecdc3f4efe"
dependencies = [
"bincode 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1146,7 +1145,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1185,7 +1184,7 @@ name = "layout_traits"
version = "0.0.1"
dependencies = [
"gfx 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
"net_traits 0.0.1",
"profile_traits 0.0.1",
@ -1351,7 +1350,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1375,7 +1374,7 @@ dependencies = [
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1420,7 +1419,7 @@ dependencies = [
"devtools_traits 0.0.1",
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
"net 0.0.1",
"net_traits 0.0.1",
@ -1440,7 +1439,7 @@ dependencies = [
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@ -1723,7 +1722,7 @@ name = "profile"
version = "0.0.1"
dependencies = [
"hbs-pow 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
@ -1741,7 +1740,7 @@ dependencies = [
name = "profile_tests"
version = "0.0.1"
dependencies = [
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"profile 0.0.1",
"profile_traits 0.0.1",
]
@ -1752,7 +1751,7 @@ version = "0.0.1"
dependencies = [
"energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"energymon 0.2.0 (git+https://github.com/energymon/energymon-rust.git)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"plugins 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1885,7 +1884,7 @@ dependencies = [
"html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1942,7 +1941,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
@ -2384,7 +2383,7 @@ dependencies = [
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2501,7 +2500,7 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"plugins 0.0.1",
@ -2527,7 +2526,7 @@ dependencies = [
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2547,7 +2546,7 @@ dependencies = [
"core-graphics 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"offscreen_gl_context 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",

47
servo/ports/cef/Cargo.lock сгенерированный
Просмотреть файл

@ -168,7 +168,7 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -187,7 +187,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"plugins 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -275,7 +275,7 @@ dependencies = [
"gfx_traits 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@ -306,7 +306,7 @@ dependencies = [
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -449,7 +449,7 @@ version = "0.0.1"
dependencies = [
"devtools_traits 0.0.1",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"plugins 0.0.1",
@ -468,7 +468,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -686,7 +686,7 @@ dependencies = [
"harfbuzz-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -964,11 +964,10 @@ dependencies = [
[[package]]
name = "ipc-channel"
version = "0.2.2"
source = "git+https://github.com/servo/ipc-channel#10bed82904d635b2ff6a916872130868cb69b104"
version = "0.2.3"
source = "git+https://github.com/servo/ipc-channel#48137d69955f5460da586c552de275ecdc3f4efe"
dependencies = [
"bincode 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1058,7 +1057,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1090,7 +1089,7 @@ name = "layout_traits"
version = "0.0.1"
dependencies = [
"gfx 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
"net_traits 0.0.1",
"profile_traits 0.0.1",
@ -1256,7 +1255,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.5 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1280,7 +1279,7 @@ dependencies = [
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1324,7 +1323,7 @@ dependencies = [
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@ -1591,7 +1590,7 @@ name = "profile"
version = "0.0.1"
dependencies = [
"hbs-pow 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
@ -1609,7 +1608,7 @@ dependencies = [
name = "profile_traits"
version = "0.0.1"
dependencies = [
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"plugins 0.0.1",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1742,7 +1741,7 @@ dependencies = [
"html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1789,7 +1788,7 @@ dependencies = [
"gfx_traits 0.0.1",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
@ -1875,7 +1874,7 @@ dependencies = [
"gfx 0.0.1",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin_app 0.0.1",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout 0.0.1",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2252,7 +2251,7 @@ dependencies = [
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2362,7 +2361,7 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"plugins 0.0.1",
@ -2388,7 +2387,7 @@ dependencies = [
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2408,7 +2407,7 @@ dependencies = [
"core-graphics 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"offscreen_gl_context 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",

7
servo/ports/geckolib/Cargo.lock сгенерированный
Просмотреть файл

@ -255,11 +255,10 @@ dependencies = [
[[package]]
name = "ipc-channel"
version = "0.2.2"
source = "git+https://github.com/servo/ipc-channel#10bed82904d635b2ff6a916872130868cb69b104"
version = "0.2.3"
source = "git+https://github.com/servo/ipc-channel#48137d69955f5460da586c552de275ecdc3f4efe"
dependencies = [
"bincode 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -576,7 +575,7 @@ dependencies = [
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",