mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Switch most crates to the 2018 edition
This commit is contained in:
parent
76e59a46d3
commit
9f9bf8f6bc
57 changed files with 82 additions and 28 deletions
|
@ -3,6 +3,7 @@ name = "servo_allocator"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_atoms"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "bluetooth"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "bluetooth_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "canvas"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "canvas_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_channel"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "compositing"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
|
||||||
use net_traits::image::base::Image;
|
use net_traits::image::base::Image;
|
||||||
#[cfg(feature = "gleam")]
|
#[cfg(feature = "gleam")]
|
||||||
use net_traits::image::base::PixelFormat;
|
use net_traits::image::base::PixelFormat;
|
||||||
use profile_traits::time::{self, ProfilerCategory, profile};
|
use profile_traits::time::{self as profile_time, ProfilerCategory, profile};
|
||||||
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
|
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
|
||||||
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
|
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
|
||||||
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
|
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
|
||||||
|
@ -150,7 +150,7 @@ pub struct IOCompositor<Window: WindowMethods> {
|
||||||
constellation_chan: Sender<ConstellationMsg>,
|
constellation_chan: Sender<ConstellationMsg>,
|
||||||
|
|
||||||
/// The channel on which messages can be sent to the time profiler.
|
/// The channel on which messages can be sent to the time profiler.
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: profile_time::ProfilerChan,
|
||||||
|
|
||||||
/// Touch input state machine
|
/// Touch input state machine
|
||||||
touch_handler: TouchHandler,
|
touch_handler: TouchHandler,
|
||||||
|
@ -366,7 +366,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
// Tell the profiler, memory profiler, and scrolling timer to shut down.
|
// Tell the profiler, memory profiler, and scrolling timer to shut down.
|
||||||
if let Ok((sender, receiver)) = ipc::channel() {
|
if let Ok((sender, receiver)) = ipc::channel() {
|
||||||
self.time_profiler_chan
|
self.time_profiler_chan
|
||||||
.send(time::ProfilerMsg::Exit(sender));
|
.send(profile_time::ProfilerMsg::Exit(sender));
|
||||||
let _ = receiver.recv();
|
let _ = receiver.recv();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_config"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "constellation"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "debugger"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "deny_public_fields"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "devtools"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "devtools_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "domobject_derive"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "embedder_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_geometry"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,6 +4,7 @@ name = "gfx"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "gfx_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "jstraceable_derive"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "layout"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "layout_thread"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "layout_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "metrics"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "msg"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "net"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
|
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
|
||||||
|
|
||||||
|
|
|
@ -544,7 +544,7 @@ fn scheme_fetch(
|
||||||
*done_chan = Some((done_sender.clone(), done_receiver));
|
*done_chan = Some((done_sender.clone(), done_receiver));
|
||||||
*response.body.lock().unwrap() = ResponseBody::Receiving(vec![]);
|
*response.body.lock().unwrap() = ResponseBody::Receiving(vec![]);
|
||||||
|
|
||||||
let mut res_body = response.body.clone();
|
let res_body = response.body.clone();
|
||||||
|
|
||||||
let cancellation_listener = context.cancellation_listener.clone();
|
let cancellation_listener = context.cancellation_listener.clone();
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ fn scheme_fetch(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let length = {
|
let length = {
|
||||||
let mut buffer = reader.fill_buf().unwrap().to_vec();
|
let buffer = reader.fill_buf().unwrap().to_vec();
|
||||||
let mut buffer_len = buffer.len();
|
let mut buffer_len = buffer.len();
|
||||||
if let ResponseBody::Receiving(ref mut body) =
|
if let ResponseBody::Receiving(ref mut body) =
|
||||||
*res_body.lock().unwrap()
|
*res_body.lock().unwrap()
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "net_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "pixels"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "profile"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "profile_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_rand"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,6 +4,7 @@ name = "range"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_remutex"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -5,6 +5,7 @@ name = "script"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
|
@ -321,9 +321,8 @@ impl AudioBufferMethods for AudioBuffer {
|
||||||
typedarray!(in(cx) let js_channel: Float32Array = js_channel);
|
typedarray!(in(cx) let js_channel: Float32Array = js_channel);
|
||||||
if let Ok(mut js_channel) = js_channel {
|
if let Ok(mut js_channel) = js_channel {
|
||||||
let bytes_to_copy = min(self.length - start_in_channel, source.len() as u32) as usize;
|
let bytes_to_copy = min(self.length - start_in_channel, source.len() as u32) as usize;
|
||||||
let mut js_channel_data = unsafe { js_channel.as_mut_slice() };
|
let js_channel_data = unsafe { js_channel.as_mut_slice() };
|
||||||
let (_, mut js_channel_data) =
|
let (_, js_channel_data) = js_channel_data.split_at_mut(start_in_channel as usize);
|
||||||
js_channel_data.split_at_mut(start_in_channel as usize);
|
|
||||||
unsafe {
|
unsafe {
|
||||||
js_channel_data[0..bytes_to_copy].copy_from_slice(&source.as_slice()[0..bytes_to_copy])
|
js_channel_data[0..bytes_to_copy].copy_from_slice(&source.as_slice()[0..bytes_to_copy])
|
||||||
};
|
};
|
||||||
|
|
|
@ -5686,7 +5686,11 @@ class CGInterfaceTrait(CGThing):
|
||||||
yield name, arguments, rettype
|
yield name, arguments, rettype
|
||||||
|
|
||||||
def fmt(arguments):
|
def fmt(arguments):
|
||||||
return "".join(", %s: %s" % argument for argument in arguments)
|
keywords = {"async"}
|
||||||
|
return "".join(
|
||||||
|
", %s: %s" % (name if name not in keywords else "r#" + name, type_)
|
||||||
|
for name, type_ in arguments
|
||||||
|
)
|
||||||
|
|
||||||
def contains_unsafe_arg(arguments):
|
def contains_unsafe_arg(arguments):
|
||||||
if not arguments or len(arguments) == 0:
|
if not arguments or len(arguments) == 0:
|
||||||
|
@ -6250,7 +6254,7 @@ class CGDictionary(CGThing):
|
||||||
d = self.dictionary
|
d = self.dictionary
|
||||||
if d.parent:
|
if d.parent:
|
||||||
initParent = ("{\n"
|
initParent = ("{\n"
|
||||||
" match try!(%s::%s::new(cx, val)) {\n"
|
" match r#try!(%s::%s::new(cx, val)) {\n"
|
||||||
" ConversionResult::Success(v) => v,\n"
|
" ConversionResult::Success(v) => v,\n"
|
||||||
" ConversionResult::Failure(error) => {\n"
|
" ConversionResult::Failure(error) => {\n"
|
||||||
" throw_type_error(cx, &error);\n"
|
" throw_type_error(cx, &error);\n"
|
||||||
|
@ -6396,7 +6400,7 @@ class CGDictionary(CGThing):
|
||||||
conversion = (
|
conversion = (
|
||||||
"{\n"
|
"{\n"
|
||||||
" rooted!(in(cx) let mut rval = UndefinedValue());\n"
|
" rooted!(in(cx) let mut rval = UndefinedValue());\n"
|
||||||
" match try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
|
" match r#try!(get_dictionary_property(cx, object.handle(), \"%s\", rval.handle_mut())) {\n"
|
||||||
" true => {\n"
|
" true => {\n"
|
||||||
"%s\n"
|
"%s\n"
|
||||||
" },\n"
|
" },\n"
|
||||||
|
@ -7167,7 +7171,7 @@ class CallbackOperationBase(CallbackMethod):
|
||||||
"methodName": self.methodName
|
"methodName": self.methodName
|
||||||
}
|
}
|
||||||
getCallableFromProp = string.Template(
|
getCallableFromProp = string.Template(
|
||||||
'try!(self.parent.get_callable_property(cx, "${methodName}"))'
|
'r#try!(self.parent.get_callable_property(cx, "${methodName}"))'
|
||||||
).substitute(replacements)
|
).substitute(replacements)
|
||||||
if not self.singleOperation:
|
if not self.singleOperation:
|
||||||
return 'rooted!(in(cx) let callable =\n' + getCallableFromProp + ');\n'
|
return 'rooted!(in(cx) let callable =\n' + getCallableFromProp + ');\n'
|
||||||
|
|
|
@ -53,7 +53,7 @@ use js::rust::wrappers::Evaluate2;
|
||||||
use libc;
|
use libc;
|
||||||
use msg::constellation_msg::PipelineId;
|
use msg::constellation_msg::PipelineId;
|
||||||
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
|
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
|
||||||
use profile_traits::{mem, time};
|
use profile_traits::{mem as profile_mem, time as profile_time};
|
||||||
use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent};
|
use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent};
|
||||||
use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource};
|
use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource};
|
||||||
use servo_url::{MutableOrigin, ServoUrl};
|
use servo_url::{MutableOrigin, ServoUrl};
|
||||||
|
@ -97,11 +97,11 @@ pub struct GlobalScope {
|
||||||
|
|
||||||
/// For sending messages to the memory profiler.
|
/// For sending messages to the memory profiler.
|
||||||
#[ignore_malloc_size_of = "channels are hard"]
|
#[ignore_malloc_size_of = "channels are hard"]
|
||||||
mem_profiler_chan: mem::ProfilerChan,
|
mem_profiler_chan: profile_mem::ProfilerChan,
|
||||||
|
|
||||||
/// For sending messages to the time profiler.
|
/// For sending messages to the time profiler.
|
||||||
#[ignore_malloc_size_of = "channels are hard"]
|
#[ignore_malloc_size_of = "channels are hard"]
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: profile_time::ProfilerChan,
|
||||||
|
|
||||||
/// A handle for communicating messages to the constellation thread.
|
/// A handle for communicating messages to the constellation thread.
|
||||||
#[ignore_malloc_size_of = "channels are hard"]
|
#[ignore_malloc_size_of = "channels are hard"]
|
||||||
|
@ -160,8 +160,8 @@ impl GlobalScope {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
pipeline_id: PipelineId,
|
pipeline_id: PipelineId,
|
||||||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||||
mem_profiler_chan: mem::ProfilerChan,
|
mem_profiler_chan: profile_mem::ProfilerChan,
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: profile_time::ProfilerChan,
|
||||||
script_to_constellation_chan: ScriptToConstellationChan,
|
script_to_constellation_chan: ScriptToConstellationChan,
|
||||||
scheduler_chan: IpcSender<TimerSchedulerMsg>,
|
scheduler_chan: IpcSender<TimerSchedulerMsg>,
|
||||||
resource_threads: ResourceThreads,
|
resource_threads: ResourceThreads,
|
||||||
|
@ -337,12 +337,12 @@ impl GlobalScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a sender to the memory profiler thread.
|
/// Get a sender to the memory profiler thread.
|
||||||
pub fn mem_profiler_chan(&self) -> &mem::ProfilerChan {
|
pub fn mem_profiler_chan(&self) -> &profile_mem::ProfilerChan {
|
||||||
&self.mem_profiler_chan
|
&self.mem_profiler_chan
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a sender to the time profiler thread.
|
/// Get a sender to the time profiler thread.
|
||||||
pub fn time_profiler_chan(&self) -> &time::ProfilerChan {
|
pub fn time_profiler_chan(&self) -> &profile_time::ProfilerChan {
|
||||||
&self.time_profiler_chan
|
&self.time_profiler_chan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,17 +513,17 @@ impl GlobalScope {
|
||||||
rval: MutableHandleValue,
|
rval: MutableHandleValue,
|
||||||
line_number: u32,
|
line_number: u32,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let metadata = time::TimerMetadata {
|
let metadata = profile_time::TimerMetadata {
|
||||||
url: if filename.is_empty() {
|
url: if filename.is_empty() {
|
||||||
self.get_url().as_str().into()
|
self.get_url().as_str().into()
|
||||||
} else {
|
} else {
|
||||||
filename.into()
|
filename.into()
|
||||||
},
|
},
|
||||||
iframe: time::TimerMetadataFrameType::RootWindow,
|
iframe: profile_time::TimerMetadataFrameType::RootWindow,
|
||||||
incremental: time::TimerMetadataReflowType::FirstReflow,
|
incremental: profile_time::TimerMetadataReflowType::FirstReflow,
|
||||||
};
|
};
|
||||||
time::profile(
|
profile_time::profile(
|
||||||
time::ProfilerCategory::ScriptEvaluate,
|
profile_time::ProfilerCategory::ScriptEvaluate,
|
||||||
Some(metadata),
|
Some(metadata),
|
||||||
self.time_profiler_chan().clone(),
|
self.time_profiler_chan().clone(),
|
||||||
|| {
|
|| {
|
||||||
|
|
|
@ -99,8 +99,8 @@ use net_traits::{Metadata, NetworkError, ReferrerPolicy, ResourceThreads};
|
||||||
use net_traits::image_cache::{ImageCache, PendingImageResponse};
|
use net_traits::image_cache::{ImageCache, PendingImageResponse};
|
||||||
use net_traits::request::{CredentialsMode, Destination, RedirectMode, RequestInit};
|
use net_traits::request::{CredentialsMode, Destination, RedirectMode, RequestInit};
|
||||||
use net_traits::storage_thread::StorageType;
|
use net_traits::storage_thread::StorageType;
|
||||||
use profile_traits::mem::{self, OpaqueSender, ReportsChan};
|
use profile_traits::mem::{self as profile_mem, OpaqueSender, ReportsChan};
|
||||||
use profile_traits::time::{self, ProfilerCategory, profile};
|
use profile_traits::time::{self as profile_time, ProfilerCategory, profile};
|
||||||
use script_layout_interface::message::{self, Msg, NewLayoutThreadInfo, ReflowGoal};
|
use script_layout_interface::message::{self, Msg, NewLayoutThreadInfo, ReflowGoal};
|
||||||
use script_traits::{CompositorEvent, ConstellationControlMsg};
|
use script_traits::{CompositorEvent, ConstellationControlMsg};
|
||||||
use script_traits::{DiscardBrowsingContext, DocumentActivity, EventResult};
|
use script_traits::{DiscardBrowsingContext, DocumentActivity, EventResult};
|
||||||
|
@ -538,10 +538,10 @@ pub struct ScriptThread {
|
||||||
/// The channel on which the image cache can send messages to ourself.
|
/// The channel on which the image cache can send messages to ourself.
|
||||||
image_cache_channel: Sender<ImageCacheMsg>,
|
image_cache_channel: Sender<ImageCacheMsg>,
|
||||||
/// For providing contact with the time profiler.
|
/// For providing contact with the time profiler.
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: profile_time::ProfilerChan,
|
||||||
|
|
||||||
/// For providing contact with the memory profiler.
|
/// For providing contact with the memory profiler.
|
||||||
mem_profiler_chan: mem::ProfilerChan,
|
mem_profiler_chan: profile_mem::ProfilerChan,
|
||||||
|
|
||||||
/// For providing instructions to an optional devtools server.
|
/// For providing instructions to an optional devtools server.
|
||||||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "script_layout_interface"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "script_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,6 +4,7 @@ name = "libservo"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "servo_url"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "webdriver_server"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "webvr"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "webvr_traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "libmlservo"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,6 +4,7 @@ version = "0.0.1"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -4,6 +4,7 @@ name = "servo"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ name = "task_info"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "deny_public_fields_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "malloc_size_of_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "metrics_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "metrics_tests"
|
name = "metrics_tests"
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "profile_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "profile_tests"
|
name = "profile_tests"
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "script_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "script_tests"
|
name = "script_tests"
|
||||||
|
|
|
@ -3,6 +3,7 @@ name = "script_plugins_tests"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["The Servo Project Developers"]
|
authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue