mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Remove usage of Gaol in the Windows configuration, since sandboxing is not supported there yet.
This commit is contained in:
parent
13d98f153a
commit
721693c43e
6 changed files with 43 additions and 9 deletions
|
@ -19,7 +19,9 @@ use compositor_thread::Msg as ToCompositorMsg;
|
||||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||||
use euclid::scale_factor::ScaleFactor;
|
use euclid::scale_factor::ScaleFactor;
|
||||||
use euclid::size::{Size2D, TypedSize2D};
|
use euclid::size::{Size2D, TypedSize2D};
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use gaol;
|
use gaol;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
||||||
use gfx::font_cache_thread::FontCacheThread;
|
use gfx::font_cache_thread::FontCacheThread;
|
||||||
use gfx_traits::{Epoch, PaintMsg as FromPaintMsg};
|
use gfx_traits::{Epoch, PaintMsg as FromPaintMsg};
|
||||||
|
@ -40,6 +42,7 @@ use offscreen_gl_context::GLContextAttributes;
|
||||||
use pipeline::{CompositionPipeline, InitialPipelineState, Pipeline, UnprivilegedPipelineContent};
|
use pipeline::{CompositionPipeline, InitialPipelineState, Pipeline, UnprivilegedPipelineContent};
|
||||||
use profile_traits::mem;
|
use profile_traits::mem;
|
||||||
use profile_traits::time;
|
use profile_traits::time;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use sandboxing;
|
use sandboxing;
|
||||||
use script_traits::{AnimationState, CompositorEvent, ConstellationControlMsg};
|
use script_traits::{AnimationState, CompositorEvent, ConstellationControlMsg};
|
||||||
use script_traits::{DocumentState, LayoutControlMsg};
|
use script_traits::{DocumentState, LayoutControlMsg};
|
||||||
|
@ -282,6 +285,7 @@ enum ExitPipelineMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ChildProcess {
|
enum ChildProcess {
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
Sandboxed(gaol::platform::process::Process),
|
Sandboxed(gaol::platform::process::Process),
|
||||||
Unsandboxed(process::Child),
|
Unsandboxed(process::Child),
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ extern crate core_graphics;
|
||||||
extern crate core_text;
|
extern crate core_text;
|
||||||
extern crate devtools_traits;
|
extern crate devtools_traits;
|
||||||
extern crate euclid;
|
extern crate euclid;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
extern crate gaol;
|
extern crate gaol;
|
||||||
extern crate gfx;
|
extern crate gfx;
|
||||||
extern crate gfx_traits;
|
extern crate gfx_traits;
|
||||||
|
@ -66,6 +67,7 @@ pub mod compositor_thread;
|
||||||
pub mod constellation;
|
pub mod constellation;
|
||||||
mod headless;
|
mod headless;
|
||||||
pub mod pipeline;
|
pub mod pipeline;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
pub mod sandboxing;
|
pub mod sandboxing;
|
||||||
mod scrolling;
|
mod scrolling;
|
||||||
mod surface_map;
|
mod surface_map;
|
||||||
|
|
4
components/servo/Cargo.lock
generated
4
components/servo/Cargo.lock
generated
|
@ -67,9 +67,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "angle"
|
name = "angle"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/ecoal95/angle?branch=servo#2c14c35cdc223eb95efcaf6830d339db5b535d76"
|
source = "git+https://github.com/ecoal95/angle?branch=servo#b31e70ef5cb675582de910d09b0c385ea2000a64"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -125,7 +125,22 @@ optional = true
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
features = ["release_max_level_info"]
|
features = ["release_max_level_info"]
|
||||||
|
|
||||||
[dependencies.gaol]
|
[target.arm-linux-androideabi.dependencies.gaol]
|
||||||
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
|
[target.x86_64-apple-darwin.dependencies.gaol]
|
||||||
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
|
[target.x86_64-unknown-linux.dependencies.gaol]
|
||||||
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
|
[target.i686-unknown-linux-gnu.dependencies.gaol]
|
||||||
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
|
[target.arm-unknown-linux-gnueabihf.dependencies.gaol]
|
||||||
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-gnueabihf.dependencies.gaol]
|
||||||
git = "https://github.com/pcwalton/gaol"
|
git = "https://github.com/pcwalton/gaol"
|
||||||
|
|
||||||
[dependencies.ipc-channel]
|
[dependencies.ipc-channel]
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
//! The `Browser` is fed events from a generic type that implements the
|
//! The `Browser` is fed events from a generic type that implements the
|
||||||
//! `WindowMethods` trait.
|
//! `WindowMethods` trait.
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
extern crate gaol;
|
extern crate gaol;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate util as _util;
|
extern crate util as _util;
|
||||||
|
@ -60,10 +61,12 @@ use compositing::CompositorMsg as ConstellationMsg;
|
||||||
use compositing::compositor_thread::InitialCompositorState;
|
use compositing::compositor_thread::InitialCompositorState;
|
||||||
use compositing::constellation::InitialConstellationState;
|
use compositing::constellation::InitialConstellationState;
|
||||||
use compositing::pipeline::UnprivilegedPipelineContent;
|
use compositing::pipeline::UnprivilegedPipelineContent;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use compositing::sandboxing;
|
use compositing::sandboxing;
|
||||||
use compositing::windowing::WindowEvent;
|
use compositing::windowing::WindowEvent;
|
||||||
use compositing::windowing::WindowMethods;
|
use compositing::windowing::WindowMethods;
|
||||||
use compositing::{CompositorProxy, CompositorThread, Constellation};
|
use compositing::{CompositorProxy, CompositorThread, Constellation};
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
|
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
|
||||||
use gfx::font_cache_thread::FontCacheThread;
|
use gfx::font_cache_thread::FontCacheThread;
|
||||||
use ipc_channel::ipc::{self, IpcSender};
|
use ipc_channel::ipc::{self, IpcSender};
|
||||||
|
@ -243,7 +246,7 @@ pub fn run_content_process(token: String) {
|
||||||
|
|
||||||
// Enter the sandbox if necessary.
|
// Enter the sandbox if necessary.
|
||||||
if opts::get().sandbox {
|
if opts::get().sandbox {
|
||||||
ChildSandbox::new(sandboxing::content_process_sandbox_profile()).activate().unwrap();
|
create_sandbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
script::init();
|
script::init();
|
||||||
|
@ -261,3 +264,13 @@ pub unsafe extern fn __errno_location() -> *mut i32 {
|
||||||
extern { fn __errno() -> *mut i32; }
|
extern { fn __errno() -> *mut i32; }
|
||||||
__errno()
|
__errno()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
|
fn create_sandbox() {
|
||||||
|
ChildSandbox::new(sandboxing::content_process_sandbox_profile()).activate().unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
fn create_sandbox() {
|
||||||
|
panic!("Sandboxing is not supported on Windows.");
|
||||||
|
}
|
||||||
|
|
10
ports/gonk/Cargo.lock
generated
10
ports/gonk/Cargo.lock
generated
|
@ -49,9 +49,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "angle"
|
name = "angle"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/ecoal95/angle?branch=servo#2c14c35cdc223eb95efcaf6830d339db5b535d76"
|
source = "git+https://github.com/ecoal95/angle?branch=servo#b31e70ef5cb675582de910d09b0c385ea2000a64"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -231,7 +231,7 @@ dependencies = [
|
||||||
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"devtools_traits 0.0.1",
|
"devtools_traits 0.0.1",
|
||||||
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
|
"gaol 0.0.1 (git+https://github.com/adamncasey/gaol)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
"gfx_traits 0.0.1",
|
"gfx_traits 0.0.1",
|
||||||
"gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -543,7 +543,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gaol"
|
name = "gaol"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/pcwalton/gaol#e1349d8d3d933b3a90f9c86baa390261c510e019"
|
source = "git+https://github.com/adamncasey/gaol#53a1af134df736ea4c980560b3bd52c3471f74e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1527,7 +1527,7 @@ dependencies = [
|
||||||
"devtools_traits 0.0.1",
|
"devtools_traits 0.0.1",
|
||||||
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gaol 0.0.1 (git+https://github.com/pcwalton/gaol)",
|
"gaol 0.0.1 (git+https://github.com/adamncasey/gaol)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
"gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
|
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue