Skip to content

Commit

Permalink
Disable gaol on arm targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Eijebong committed Dec 20, 2018
1 parent 16beb65 commit 1d0af2d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/constellation/Cargo.toml
Expand Up @@ -45,5 +45,5 @@ servo_url = {path = "../url"}
webvr_traits = {path = "../webvr_traits"}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}

[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android")))'.dependencies]
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm")))'.dependencies]
gaol = {git = "https://github.com/servo/gaol"}
4 changes: 2 additions & 2 deletions components/constellation/lib.rs
Expand Up @@ -17,7 +17,7 @@ mod constellation;
mod event_loop;
mod network_listener;
mod pipeline;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
mod sandboxing;
mod session_history;
mod timer_scheduler;
Expand All @@ -26,5 +26,5 @@ pub use crate::constellation::{
Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState,
};
pub use crate::pipeline::UnprivilegedPipelineContent;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
pub use crate::sandboxing::content_process_sandbox_profile;
4 changes: 2 additions & 2 deletions components/constellation/pipeline.rs
Expand Up @@ -571,7 +571,7 @@ impl UnprivilegedPipelineContent {
}
}

#[cfg(target_os = "android")]
#[cfg(any(target_os = "android", target_arch="arm"))]
pub fn spawn_multiprocess(self) -> Result<(), Error> {
use ipc_channel::ipc::IpcOneShotServer;
// Note that this function can panic, due to process creation,
Expand All @@ -593,7 +593,7 @@ impl UnprivilegedPipelineContent {
Ok(())
}

#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
pub fn spawn_multiprocess(self) -> Result<(), Error> {
use crate::sandboxing::content_process_sandbox_profile;
use gaol::sandbox::{self, Sandbox, SandboxMethods};
Expand Down
2 changes: 1 addition & 1 deletion components/servo/Cargo.toml
Expand Up @@ -71,5 +71,5 @@ webdriver_server = {path = "../webdriver_server", optional = true}
webvr = {path = "../webvr"}
webvr_traits = {path = "../webvr_traits"}

[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android")))'.dependencies]
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm")))'.dependencies]
gaol = {git = "https://github.com/servo/gaol"}
10 changes: 5 additions & 5 deletions components/servo/lib.rs
Expand Up @@ -68,14 +68,14 @@ use canvas::webgl_thread::WebGLThreads;
use compositing::compositor_thread::{CompositorProxy, CompositorReceiver, InitialCompositorState};
use compositing::windowing::{WindowEvent, WindowMethods};
use compositing::{IOCompositor, RenderNotifier, ShutdownState};
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
use constellation::content_process_sandbox_profile;
use constellation::{Constellation, InitialConstellationState, UnprivilegedPipelineContent};
use constellation::{FromCompositorLogger, FromScriptLogger};
use crossbeam_channel::{unbounded, Sender};
use embedder_traits::{EmbedderMsg, EmbedderProxy, EmbedderReceiver, EventLoopWaker};
use env_logger::Builder as EnvLoggerBuilder;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc::{self, IpcSender};
Expand Down Expand Up @@ -661,14 +661,14 @@ pub fn run_content_process(token: String) {
);
}

#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android")))]
#[cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch="arm")))]
fn create_sandbox() {
ChildSandbox::new(content_process_sandbox_profile())
.activate()
.expect("Failed to activate sandbox!");
}

#[cfg(any(target_os = "windows", target_os = "ios", target_os = "android"))]
#[cfg(any(target_os = "windows", target_os = "ios", target_os = "android", target_arch="arm"))]
fn create_sandbox() {
panic!("Sandboxing is not supported on Windows, iOS and android.");
panic!("Sandboxing is not supported on Windows, iOS, ARM targets and android.");
}

0 comments on commit 1d0af2d

Please sign in to comment.