mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use MozTools 4 and update mozjs (#30326)
* Update mozjs * moztools4 in bootstrap * no autoconf * tidy * switch to servo-build-deps * update mozjs for real * glue mozjs * fmt * move to servo/mozjs
This commit is contained in:
parent
9b1247b20f
commit
59d134133f
11 changed files with 46 additions and 20 deletions
36
Cargo.lock
generated
36
Cargo.lock
generated
|
@ -382,6 +382,27 @@ dependencies = [
|
||||||
"which",
|
"which",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bindgen"
|
||||||
|
version = "0.66.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.4.0",
|
||||||
|
"cexpr",
|
||||||
|
"clang-sys",
|
||||||
|
"lazy_static",
|
||||||
|
"lazycell",
|
||||||
|
"peeking_take_while",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"regex",
|
||||||
|
"rustc-hash",
|
||||||
|
"shlex",
|
||||||
|
"syn 2.0.29",
|
||||||
|
"which",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bit-set"
|
name = "bit-set"
|
||||||
version = "0.5.3"
|
version = "0.5.3"
|
||||||
|
@ -1527,9 +1548,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding_c"
|
name = "encoding_c"
|
||||||
version = "0.9.7"
|
version = "0.9.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1891d977f814fd638c3b964987778665b5d1dc8690f46c4c7adc91466ad1c78a"
|
checksum = "9af727805f3b0d79956bde5b35732669fb5c5d45a94893798e7b7e70cfbf9cc1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
]
|
]
|
||||||
|
@ -3692,8 +3713,9 @@ checksum = "903970ae2f248d7275214cf8f387f8ba0c4ea7e3d87a320e85493db60ce28616"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozjs"
|
name = "mozjs"
|
||||||
version = "0.14.1"
|
version = "0.14.1"
|
||||||
source = "git+https://github.com/servo/mozjs#8dcf64e1dd1c362b2af3abb735f100bdff8a627d"
|
source = "git+https://github.com/servo/mozjs#d7f6f30cb9bfd3e7e4d1ff7d605059369acdf25d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"bindgen 0.66.1",
|
||||||
"cc",
|
"cc",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -3705,9 +3727,9 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozjs_sys"
|
name = "mozjs_sys"
|
||||||
version = "0.68.2"
|
version = "0.68.2"
|
||||||
source = "git+https://github.com/servo/mozjs#8dcf64e1dd1c362b2af3abb735f100bdff8a627d"
|
source = "git+https://github.com/servo/mozjs#d7f6f30cb9bfd3e7e4d1ff7d605059369acdf25d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen 0.66.1",
|
||||||
"cc",
|
"cc",
|
||||||
"encoding_c",
|
"encoding_c",
|
||||||
"encoding_c_mem",
|
"encoding_c_mem",
|
||||||
|
@ -5800,7 +5822,7 @@ dependencies = [
|
||||||
"app_units",
|
"app_units",
|
||||||
"arrayvec 0.7.4",
|
"arrayvec 0.7.4",
|
||||||
"atomic_refcell",
|
"atomic_refcell",
|
||||||
"bindgen",
|
"bindgen 0.62.0",
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"cssparser",
|
"cssparser",
|
||||||
|
@ -6925,7 +6947,7 @@ version = "0.0.1"
|
||||||
source = "git+https://github.com/servo/webxr#b29816a530a7519e30124c6e636511857c32433d"
|
source = "git+https://github.com/servo/webxr#b29816a530a7519e30124c6e636511857c32433d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android_injected_glue",
|
"android_injected_glue",
|
||||||
"bindgen",
|
"bindgen 0.62.0",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"euclid",
|
"euclid",
|
||||||
"gl_generator 0.13.1",
|
"gl_generator 0.13.1",
|
||||||
|
|
|
@ -356,7 +356,7 @@ pub fn is_dom_proxy(obj: *mut JSObject) -> bool {
|
||||||
use js::glue::IsProxyHandlerFamily;
|
use js::glue::IsProxyHandlerFamily;
|
||||||
unsafe {
|
unsafe {
|
||||||
let clasp = get_object_class(obj);
|
let clasp = get_object_class(obj);
|
||||||
((*clasp).flags & js::JSCLASS_IS_PROXY) != 0 && IsProxyHandlerFamily(obj) != 0
|
((*clasp).flags & js::JSCLASS_IS_PROXY) != 0 && IsProxyHandlerFamily(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ pub(crate) unsafe fn private_from_proto_check(
|
||||||
let dom_class = get_dom_class(obj).or_else(|_| {
|
let dom_class = get_dom_class(obj).or_else(|_| {
|
||||||
if IsWrapper(obj) {
|
if IsWrapper(obj) {
|
||||||
trace!("found wrapper");
|
trace!("found wrapper");
|
||||||
obj = UnwrapObjectDynamic(obj, cx, /* stopAtWindowProxy = */ 0);
|
obj = UnwrapObjectDynamic(obj, cx, /* stopAtWindowProxy = */ false);
|
||||||
if obj.is_null() {
|
if obj.is_null() {
|
||||||
trace!("unwrapping security wrapper failed");
|
trace!("unwrapping security wrapper failed");
|
||||||
Err(())
|
Err(())
|
||||||
|
|
|
@ -113,7 +113,7 @@ unsafe fn html_constructor(
|
||||||
|
|
||||||
// The new_target might be a cross-compartment wrapper. Get the underlying object
|
// The new_target might be a cross-compartment wrapper. Get the underlying object
|
||||||
// so we can do the spec's object-identity checks.
|
// so we can do the spec's object-identity checks.
|
||||||
rooted!(in(*cx) let new_target_unwrapped = UnwrapObjectDynamic(call_args.new_target().to_object(), *cx, 1));
|
rooted!(in(*cx) let new_target_unwrapped = UnwrapObjectDynamic(call_args.new_target().to_object(), *cx, true));
|
||||||
if new_target_unwrapped.is_null() {
|
if new_target_unwrapped.is_null() {
|
||||||
throw_dom_exception(cx, global, Error::Type("new.target is null".to_owned()));
|
throw_dom_exception(cx, global, Error::Type("new.target is null".to_owned()));
|
||||||
return Err(());
|
return Err(());
|
||||||
|
|
|
@ -431,7 +431,7 @@ pub fn define_guarded_properties(
|
||||||
/// be exposed in the global object `obj`.
|
/// be exposed in the global object `obj`.
|
||||||
pub fn is_exposed_in(object: HandleObject, globals: Globals) -> bool {
|
pub fn is_exposed_in(object: HandleObject, globals: Globals) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let unwrapped = UncheckedUnwrapObject(object.get(), /* stopAtWindowProxy = */ 0);
|
let unwrapped = UncheckedUnwrapObject(object.get(), /* stopAtWindowProxy = */ false);
|
||||||
let dom_class = get_dom_class(unwrapped).unwrap();
|
let dom_class = get_dom_class(unwrapped).unwrap();
|
||||||
globals.contains(dom_class.global)
|
globals.contains(dom_class.global)
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,7 @@ pub unsafe fn find_enum_value<'a, T>(
|
||||||
/// <https://heycam.github.io/webidl/#dfn-platform-object>
|
/// <https://heycam.github.io/webidl/#dfn-platform-object>
|
||||||
pub fn is_platform_object_dynamic(obj: *mut JSObject, cx: *mut JSContext) -> bool {
|
pub fn is_platform_object_dynamic(obj: *mut JSObject, cx: *mut JSContext) -> bool {
|
||||||
is_platform_object(obj, &|o| unsafe {
|
is_platform_object(obj, &|o| unsafe {
|
||||||
UnwrapObjectDynamic(o, cx, /* stopAtWindowProxy = */ 0)
|
UnwrapObjectDynamic(o, cx, /* stopAtWindowProxy = */ false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2174,7 +2174,7 @@ impl GlobalScope {
|
||||||
cx: *mut JSContext,
|
cx: *mut JSContext,
|
||||||
) -> DomRoot<Self> {
|
) -> DomRoot<Self> {
|
||||||
if IsWrapper(obj) {
|
if IsWrapper(obj) {
|
||||||
obj = UnwrapObjectDynamic(obj, cx, /* stopAtWindowProxy = */ 0);
|
obj = UnwrapObjectDynamic(obj, cx, /* stopAtWindowProxy = */ false);
|
||||||
assert!(!obj.is_null());
|
assert!(!obj.is_null());
|
||||||
}
|
}
|
||||||
GlobalScope::from_object(obj)
|
GlobalScope::from_object(obj)
|
||||||
|
|
|
@ -37,6 +37,7 @@ use crate::script_thread::trace_thread;
|
||||||
use crate::task::TaskBox;
|
use crate::task::TaskBox;
|
||||||
use crate::task_source::networking::NetworkingTaskSource;
|
use crate::task_source::networking::NetworkingTaskSource;
|
||||||
use crate::task_source::{TaskSource, TaskSourceName};
|
use crate::task_source::{TaskSource, TaskSourceName};
|
||||||
|
use core::ffi::c_char;
|
||||||
use js::glue::{CollectServoSizes, CreateJobQueue, DeleteJobQueue, DispatchableRun};
|
use js::glue::{CollectServoSizes, CreateJobQueue, DeleteJobQueue, DispatchableRun};
|
||||||
use js::glue::{JobQueueTraps, RUST_js_GetErrorMessage, SetBuildId, StreamConsumerConsumeChunk};
|
use js::glue::{JobQueueTraps, RUST_js_GetErrorMessage, SetBuildId, StreamConsumerConsumeChunk};
|
||||||
use js::glue::{
|
use js::glue::{
|
||||||
|
@ -836,7 +837,7 @@ unsafe extern "C" fn trace_rust_roots(tr: *mut JSTracer, _data: *mut os::raw::c_
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe extern "C" fn servo_build_id(build_id: *mut BuildIdCharVector) -> bool {
|
unsafe extern "C" fn servo_build_id(build_id: *mut BuildIdCharVector) -> bool {
|
||||||
let servo_id = b"Servo\0";
|
let servo_id = b"Servo\0";
|
||||||
SetBuildId(build_id, &servo_id[0], servo_id.len())
|
SetBuildId(build_id, servo_id[0] as *const c_char, servo_id.len())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
|
|
|
@ -25,7 +25,7 @@ clangStdenv.mkDerivation rec {
|
||||||
llvmPackages.bintools # provides lld
|
llvmPackages.bintools # provides lld
|
||||||
|
|
||||||
# Build utilities
|
# Build utilities
|
||||||
cmake dbus gcc git pkg-config which llvm autoconf213 perl yasm m4
|
cmake dbus gcc git pkg-config which llvm perl yasm m4
|
||||||
(python3.withPackages (ps: with ps; [virtualenv pip dbus]))
|
(python3.withPackages (ps: with ps; [virtualenv pip dbus]))
|
||||||
# This pins gnumake to 4.3 since 4.4 breaks jobserver
|
# This pins gnumake to 4.3 since 4.4 breaks jobserver
|
||||||
# functionality in mozjs and causes builds to be extremely
|
# functionality in mozjs and causes builds to be extremely
|
||||||
|
|
|
@ -17,14 +17,14 @@ from .. import util
|
||||||
from .base import Base
|
from .base import Base
|
||||||
|
|
||||||
# Please keep these in sync with the packages in README.md
|
# Please keep these in sync with the packages in README.md
|
||||||
APT_PKGS = ['git', 'curl', 'autoconf', 'libx11-dev', 'libfreetype6-dev',
|
APT_PKGS = ['git', 'curl', 'libx11-dev', 'libfreetype6-dev',
|
||||||
'libgl1-mesa-dri', 'libglib2.0-dev', 'xorg-dev', 'gperf', 'g++',
|
'libgl1-mesa-dri', 'libglib2.0-dev', 'xorg-dev', 'gperf', 'g++',
|
||||||
'build-essential', 'cmake', 'liblzma-dev', 'libxmu6', 'libxmu-dev',
|
'build-essential', 'cmake', 'liblzma-dev', 'libxmu6', 'libxmu-dev',
|
||||||
"libxcb-render0-dev", "libxcb-shape0-dev", "libxcb-xfixes0-dev",
|
"libxcb-render0-dev", "libxcb-shape0-dev", "libxcb-xfixes0-dev",
|
||||||
'libgles2-mesa-dev', 'libegl1-mesa-dev', 'libdbus-1-dev',
|
'libgles2-mesa-dev', 'libegl1-mesa-dev', 'libdbus-1-dev',
|
||||||
'libharfbuzz-dev', 'ccache', 'clang', 'libunwind-dev',
|
'libharfbuzz-dev', 'ccache', 'clang', 'libunwind-dev',
|
||||||
'libgstreamer1.0-dev', 'libgstreamer-plugins-base1.0-dev',
|
'libgstreamer1.0-dev', 'libgstreamer-plugins-base1.0-dev',
|
||||||
'libgstreamer-plugins-bad1.0-dev', 'autoconf2.13',
|
'libgstreamer-plugins-bad1.0-dev',
|
||||||
'libunwind-dev', 'llvm-dev']
|
'libunwind-dev', 'llvm-dev']
|
||||||
DNF_PKGS = ['libtool', 'gcc-c++', 'libXi-devel', 'freetype-devel',
|
DNF_PKGS = ['libtool', 'gcc-c++', 'libXi-devel', 'freetype-devel',
|
||||||
'libunwind-devel', 'mesa-libGL-devel', 'mesa-libEGL-devel',
|
'libunwind-devel', 'mesa-libGL-devel', 'mesa-libEGL-devel',
|
||||||
|
@ -32,7 +32,7 @@ DNF_PKGS = ['libtool', 'gcc-c++', 'libXi-devel', 'freetype-devel',
|
||||||
'fontconfig-devel', 'cabextract', 'ttmkfdir', 'expat-devel',
|
'fontconfig-devel', 'cabextract', 'ttmkfdir', 'expat-devel',
|
||||||
'rpm-build', 'cmake', 'libXcursor-devel', 'libXmu-devel',
|
'rpm-build', 'cmake', 'libXcursor-devel', 'libXmu-devel',
|
||||||
'dbus-devel', 'ncurses-devel', 'harfbuzz-devel', 'ccache',
|
'dbus-devel', 'ncurses-devel', 'harfbuzz-devel', 'ccache',
|
||||||
'clang', 'clang-libs', 'llvm', 'autoconf213', 'python3-devel',
|
'clang', 'clang-libs', 'llvm', 'python3-devel',
|
||||||
'gstreamer1-devel', 'gstreamer1-plugins-base-devel',
|
'gstreamer1-devel', 'gstreamer1-plugins-base-devel',
|
||||||
'gstreamer1-plugins-bad-free-devel', 'libjpeg-turbo-devel',
|
'gstreamer1-plugins-bad-free-devel', 'libjpeg-turbo-devel',
|
||||||
'zlib', 'libjpeg']
|
'zlib', 'libjpeg']
|
||||||
|
@ -42,7 +42,7 @@ XBPS_PKGS = ['libtool', 'gcc', 'libXi-devel', 'freetype-devel',
|
||||||
'fontconfig-devel', 'cabextract', 'expat-devel', 'cmake',
|
'fontconfig-devel', 'cabextract', 'expat-devel', 'cmake',
|
||||||
'cmake', 'libXcursor-devel', 'libXmu-devel', 'dbus-devel',
|
'cmake', 'libXcursor-devel', 'libXmu-devel', 'dbus-devel',
|
||||||
'ncurses-devel', 'harfbuzz-devel', 'ccache', 'glu-devel',
|
'ncurses-devel', 'harfbuzz-devel', 'ccache', 'glu-devel',
|
||||||
'clang', 'gstreamer1-devel', 'autoconf213',
|
'clang', 'gstreamer1-devel',
|
||||||
'gst-plugins-base1-devel', 'gst-plugins-bad1-devel']
|
'gst-plugins-base1-devel', 'gst-plugins-bad1-devel']
|
||||||
|
|
||||||
GSTREAMER_URL = \
|
GSTREAMER_URL = \
|
||||||
|
|
|
@ -19,7 +19,7 @@ from .base import Base
|
||||||
|
|
||||||
DEPS_URL = "https://github.com/servo/servo-build-deps/releases/download/msvc-deps/"
|
DEPS_URL = "https://github.com/servo/servo-build-deps/releases/download/msvc-deps/"
|
||||||
DEPENDENCIES = {
|
DEPENDENCIES = {
|
||||||
"moztools": "3.2",
|
"moztools": "4.0",
|
||||||
}
|
}
|
||||||
|
|
||||||
URL_BASE = "https://gstreamer.freedesktop.org/data/pkg/windows/1.16.0/"
|
URL_BASE = "https://gstreamer.freedesktop.org/data/pkg/windows/1.16.0/"
|
||||||
|
|
|
@ -73,6 +73,9 @@ packages = [
|
||||||
|
|
||||||
# Duplicated by servo-media.
|
# Duplicated by servo-media.
|
||||||
"uuid",
|
"uuid",
|
||||||
|
|
||||||
|
# style/webxr (0.62) vs. mozjs_sys (0.66)
|
||||||
|
"bindgen",
|
||||||
]
|
]
|
||||||
# Files that are ignored for all tidy and lint checks.
|
# Files that are ignored for all tidy and lint checks.
|
||||||
files = [
|
files = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue