diff options
Diffstat (limited to 'components/servo/main.rs')
-rw-r--r-- | components/servo/main.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/servo/main.rs b/components/servo/main.rs index 361e0f01a75..4622040fa44 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -37,6 +37,17 @@ use servo::util::opts::{self, ArgumentParsingResult}; use servo::util::panicking::initiate_panic_hook; use std::rc::Rc; +pub mod platform { + #[cfg(target_os = "macos")] + pub use platform::macos::deinit; + + #[cfg(target_os = "macos")] + pub mod macos; + + #[cfg(not(target_os = "macos"))] + pub fn deinit() {} +} + fn main() { // Parse the command line options and store them globally let opts_result = opts::from_cmdline_args(&*args()); @@ -82,6 +93,8 @@ fn main() { }; unregister_glutin_resize_handler(&window); + + platform::deinit() } fn register_glutin_resize_handler(window: &Rc<app::window::Window>, |