diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 62025de4c51..69a02ad05e6 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -26,7 +26,9 @@ use gaol; use gaol::sandbox::{self, Sandbox, SandboxMethods}; use gfx::font_cache_thread::FontCacheThread; use gfx_traits::Epoch; -use ipc_channel::ipc::{self, IpcOneShotServer, IpcSender}; +#[cfg(not(target_os = "windows"))] +use ipc_channel::ipc::IpcOneShotServer; +use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::router::ROUTER; use layout_traits::{LayoutControlChan, LayoutThreadFactory}; use msg::constellation_msg::WebDriverCommandMsg; @@ -54,6 +56,7 @@ use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, Scri use script_traits::{MozBrowserEvent, MozBrowserErrorType}; use std::borrow::ToOwned; use std::collections::HashMap; +#[cfg(not(target_os = "windows"))] use std::env; use std::io::Error as IOError; use std::marker::PhantomData; @@ -179,6 +182,7 @@ pub struct Constellation { scheduler_chan: IpcSender, /// A list of child content processes. + #[cfg_attr(target_os = "windows", allow(dead_code))] child_processes: Vec, /// Document states for loaded pipelines (used only when writing screenshots). @@ -317,8 +321,9 @@ enum ExitPipelineMode { } enum ChildProcess { -#[cfg(not(target_os = "windows"))] + #[cfg(not(target_os = "windows"))] Sandboxed(gaol::platform::process::Process), + #[cfg(not(target_os = "windows"))] Unsandboxed(process::Child), } diff --git a/components/profile/lib.rs b/components/profile/lib.rs index da2d03c0a8d..eaea167644d 100644 --- a/components/profile/lib.rs +++ b/components/profile/lib.rs @@ -2,7 +2,7 @@ * 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/. */ -#![feature(alloc_jemalloc)] +#![cfg_attr(not(target_os = "windows"), feature(alloc_jemalloc))] #![feature(box_syntax)] #![feature(iter_arith)] #![feature(plugin)] diff --git a/components/profile/mem.rs b/components/profile/mem.rs index b82b5672d6d..75cb8cf0f38 100644 --- a/components/profile/mem.rs +++ b/components/profile/mem.rs @@ -356,10 +356,14 @@ impl ReportsForest { //--------------------------------------------------------------------------- mod system_reporter { + #[cfg(not(target_os = "windows"))] use libc::{c_char, c_int, c_void, size_t}; use profile_traits::mem::{Report, ReportKind, ReporterRequest}; + #[cfg(not(target_os = "windows"))] use std::ffi::CString; + #[cfg(not(target_os = "windows"))] use std::mem::size_of; + #[cfg(not(target_os = "windows"))] use std::ptr::null_mut; use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR}; #[cfg(target_os = "macos")] @@ -456,6 +460,7 @@ mod system_reporter { None } + #[cfg(not(target_os = "windows"))] extern { #[cfg_attr(any(target_os = "macos", target_os = "android"), link_name = "je_mallctl")] fn mallctl(name: *const c_char, oldp: *mut c_void, oldlenp: *mut size_t, @@ -499,7 +504,7 @@ mod system_reporter { } #[cfg(target_os = "windows")] - fn jemalloc_stat(value_name: &str) -> Option { + fn jemalloc_stat(_value_name: &str) -> Option { None }