2014-05-02 02:07:48 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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/. */
|
|
|
|
|
2017-02-21 16:15:15 +03:00
|
|
|
#![allow(non_camel_case_types)]
|
2015-02-13 17:36:50 +03:00
|
|
|
#![feature(box_syntax)]
|
2015-06-25 21:03:15 +03:00
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
#![feature(link_args)]
|
2015-03-18 20:25:00 +03:00
|
|
|
|
2015-01-28 04:15:50 +03:00
|
|
|
#[macro_use]
|
2014-05-02 02:07:48 +04:00
|
|
|
extern crate log;
|
|
|
|
|
|
|
|
extern crate servo;
|
2014-12-10 19:40:03 +03:00
|
|
|
extern crate compositing;
|
2014-05-02 02:07:48 +04:00
|
|
|
|
2015-06-19 05:50:22 +03:00
|
|
|
extern crate euclid;
|
2014-12-10 19:40:03 +03:00
|
|
|
extern crate gleam;
|
2015-01-19 22:57:46 +03:00
|
|
|
extern crate glutin_app;
|
2015-04-03 14:29:12 +03:00
|
|
|
extern crate script_traits;
|
2016-12-15 03:48:42 +03:00
|
|
|
extern crate servo_config;
|
|
|
|
extern crate servo_geometry;
|
2016-11-18 00:34:47 +03:00
|
|
|
extern crate servo_url;
|
|
|
|
extern crate style_traits;
|
2014-05-02 02:07:48 +04:00
|
|
|
|
2015-08-07 10:55:20 +03:00
|
|
|
extern crate net_traits;
|
2015-02-10 13:51:46 +03:00
|
|
|
extern crate msg;
|
2017-01-23 18:26:00 +03:00
|
|
|
extern crate webrender_traits;
|
2014-05-02 02:07:48 +04:00
|
|
|
|
|
|
|
extern crate libc;
|
|
|
|
|
servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck
> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1
Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-20 01:46:55 +03:00
|
|
|
#[cfg(target_os="macos")]
|
|
|
|
#[link_args="-Xlinker -undefined -Xlinker dynamic_lookup"]
|
|
|
|
extern { }
|
|
|
|
|
2014-12-10 19:40:03 +03:00
|
|
|
#[cfg(target_os="macos")]
|
|
|
|
extern crate cocoa;
|
2014-05-02 02:07:48 +04:00
|
|
|
#[cfg(target_os="macos")]
|
2015-05-05 17:11:30 +03:00
|
|
|
#[macro_use]
|
|
|
|
extern crate objc;
|
2014-05-02 02:07:48 +04:00
|
|
|
|
2014-11-28 09:18:44 +03:00
|
|
|
// Must come first.
|
|
|
|
pub mod macros;
|
|
|
|
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod browser;
|
2014-12-10 19:40:03 +03:00
|
|
|
pub mod browser_host;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod command_line;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod cookie;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod core;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod drag_data;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod eutil;
|
2014-12-10 19:40:03 +03:00
|
|
|
pub mod frame;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod interfaces;
|
|
|
|
pub mod print_settings;
|
|
|
|
pub mod process_message;
|
2014-12-10 19:40:03 +03:00
|
|
|
pub mod render_handler;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod request;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod request_context;
|
|
|
|
pub mod response;
|
|
|
|
pub mod stream;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod string;
|
2014-10-15 19:48:24 +04:00
|
|
|
pub mod string_list;
|
2014-11-14 03:06:30 +03:00
|
|
|
pub mod string_map;
|
2014-11-19 00:39:31 +03:00
|
|
|
pub mod string_multimap;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod stubs;
|
2014-11-20 23:06:32 +03:00
|
|
|
pub mod switches;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod task;
|
2014-05-02 02:07:48 +04:00
|
|
|
pub mod types;
|
2014-05-27 01:07:15 +04:00
|
|
|
pub mod urlrequest;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod v8;
|
2014-12-10 19:40:03 +03:00
|
|
|
pub mod values;
|
|
|
|
pub mod window;
|
2014-11-28 09:18:44 +03:00
|
|
|
pub mod wrappers;
|
|
|
|
pub mod xml_reader;
|
|
|
|
pub mod zip_reader;
|