aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2018-05-30 14:44:47 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2018-05-30 14:44:47 -0500
commitd0cc9d2cd56a197fdfb72d8c0168d4cf2bb23bdb (patch)
tree150c4f8b1b07d2fcc5944315954e1414552768c2
parent0786e34a3af55377f2d9eac81c0960a8b13acfda (diff)
downloadservo-d0cc9d2cd56a197fdfb72d8c0168d4cf2bb23bdb.tar.gz
servo-d0cc9d2cd56a197fdfb72d8c0168d4cf2bb23bdb.zip
Updated to mozjs v0.7.1.
-rw-r--r--Cargo.lock26
-rw-r--r--appveyor.yml1
-rw-r--r--components/malloc_size_of/Cargo.toml2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py16
-rw-r--r--components/script/dom/bindings/reflector.rs2
-rw-r--r--components/script/dom/bindings/trace.rs2
-rw-r--r--components/script/dom/customelementregistry.rs4
-rw-r--r--components/script/dom/history.rs2
-rw-r--r--components/script/dom/promise.rs6
-rw-r--r--components/script/timers.rs2
-rw-r--r--python/servo/command_base.py3
-rw-r--r--python/servo/packages.py1
13 files changed, 39 insertions, 30 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9dea04f2375..b86211f1816 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -139,14 +139,16 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.36.0"
+version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1625,7 +1627,7 @@ dependencies = [
"hashglobe 0.1.0",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozjs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozjs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.19.0",
"serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_bytes 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1804,22 +1806,24 @@ dependencies = [
[[package]]
name = "mozjs"
-version = "0.6.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozjs_sys 0.50.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozjs_sys 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mozjs_sys"
-version = "0.50.1"
+version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "bindgen 0.36.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2505,7 +2509,7 @@ dependencies = [
"mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozangle 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "mozjs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mozjs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
"num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2982,7 +2986,7 @@ dependencies = [
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bindgen 0.36.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.36.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3767,7 +3771,7 @@ dependencies = [
"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9"
"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
"checksum bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0"
-"checksum bindgen 0.36.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc7003ec1f7f5579901b5805f401a0defa450b14497c3cba4fbc0496f85ba429"
+"checksum bindgen 0.36.1 (registry+https://github.com/rust-lang/crates.io-index)" = "acc8fa644dc2b6f6c2d391ccea460da1ad9bf2271c4e9ffaad88d2dd727a7295"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989"
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
@@ -3900,8 +3904,8 @@ dependencies = [
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
"checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f"
"checksum mozangle 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1f0583e6792917f498bb3a7440f777a59353102063445ab7f5e9d1dc4ed593aa"
-"checksum mozjs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "469f86d1ce125f1a9960e9f5f924388e47b58ac6bf7525f8f98fdc1160decf58"
-"checksum mozjs_sys 0.50.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e61a792a125b1364c5ec50255ed8343ce02dc56098f8868dd209d472c8de006a"
+"checksum mozjs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9c59044218be40e6f412b32e845ce841f34e7d7bfc532ac046fcc5720152e55"
+"checksum mozjs_sys 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a64b67dfd2d9b4bb084c9581db10dfe7e7b8b04b86612cdddd1aec26cf1d11f3"
"checksum mp3-metadata 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ab5f1d2693586420208d1200ce5a51cd44726f055b635176188137aff42c7de"
"checksum mp4parse 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f821e3799bc0fd16d9b861fb02fa7ee1b5fba29f45ad591dade105c48ca9a1a0"
"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67"
diff --git a/appveyor.yml b/appveyor.yml
index dfb979fe4fb..532034f191e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -25,7 +25,6 @@ environment:
C:\\Program Files (x86)\\MSBuild\\14.0\\Bin;\
C:\\Program Files\\Amazon\\AWSCLI\\;\
C:\\Program Files\\Microsoft Windows Performance Toolkit\\;\
- C:\\Program Files\\LLVM\\bin;\
C:\\Program Files\\Git LFS;\
C:\\Program Files\\Git\\cmd;\
C:\\Program Files\\Git\\usr\\bin;\
diff --git a/components/malloc_size_of/Cargo.toml b/components/malloc_size_of/Cargo.toml
index 7db5fbc8f89..92376a6cd61 100644
--- a/components/malloc_size_of/Cargo.toml
+++ b/components/malloc_size_of/Cargo.toml
@@ -29,7 +29,7 @@ euclid = "0.17"
hashglobe = { path = "../hashglobe" }
hyper = { version = "0.10", optional = true }
hyper_serde = { version = "0.8", optional = true }
-mozjs = { version = "0.6", features = ["promises"], optional = true }
+mozjs = { version = "0.7.1", features = ["promises"], optional = true }
selectors = { path = "../selectors" }
serde = { version = "1.0.27", optional = true }
serde_bytes = { version = "0.10", optional = true }
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 209ce6c2ee1..f9a4aadf6d9 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -64,7 +64,7 @@ metrics = {path = "../metrics"}
mitochondria = "1.1.2"
mime = "0.2.1"
mime_guess = "1.8.0"
-mozjs = { version = "0.6", features = ["promises"]}
+mozjs = { version = "0.7.1", features = ["promises"]}
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
num-traits = "0.1.32"
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index e7423c670eb..01b52d916ae 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -361,7 +361,7 @@ class CGMethodCall(CGThing):
for i in range(0, distinguishingIndex)]
# Select the right overload from our set.
- distinguishingArg = "args.get(%d)" % distinguishingIndex
+ distinguishingArg = "HandleValue::from_raw(args.get(%d))" % distinguishingIndex
def pickFirstSignature(condition, filterLambda):
sigs = filter(filterLambda, possibleSignatures)
@@ -1284,7 +1284,7 @@ class CGArgumentConverter(CGThing):
}
replacementVariables = {
- "val": string.Template("${args}.get(${index})").substitute(replacer),
+ "val": string.Template("HandleValue::from_raw(${args}.get(${index}))").substitute(replacer),
}
info = getJSToNativeConversionInfo(
@@ -1328,7 +1328,7 @@ class CGArgumentConverter(CGThing):
else:
assert argument.optional
variadicConversion = {
- "val": string.Template("${args}.get(variadicArg)").substitute(replacer),
+ "val": string.Template("HandleValue::from_raw(${args}.get(variadicArg))").substitute(replacer),
}
innerConverter = [instantiateJSToNativeConversionTemplate(
template, variadicConversion, declType, "slot")]
@@ -3365,7 +3365,7 @@ class CGPerSignatureCall(CGThing):
return 'infallible' not in self.extendedAttributes
def wrap_return_value(self):
- return wrapForType('args.rval()')
+ return wrapForType('MutableHandleValue::from_raw(args.rval())')
def define(self):
return (self.cgRoot.define() + "\n" + self.wrap_return_value())
@@ -3516,7 +3516,7 @@ class CGSpecializedMethod(CGAbstractExternMethod):
self.descriptor, self.method),
pre="let this = &*this;\n"
"let args = &*args;\n"
- "let argc = args._base.argc_;\n")
+ "let argc = args.argc_;\n")
@staticmethod
def makeNativeName(descriptor, method):
@@ -3675,7 +3675,7 @@ if !v.is_object() {
return false;
}
rooted!(in(cx) let target_obj = v.to_object());
-JS_SetProperty(cx, target_obj.handle(), %s as *const u8 as *const libc::c_char, args.get(0))
+JS_SetProperty(cx, target_obj.handle(), %s as *const u8 as *const libc::c_char, HandleValue::from_raw(args.get(0)))
""" % (str_to_const_array(attrName), attrName, str_to_const_array(forwardToAttrName)))
@@ -3693,7 +3693,7 @@ class CGSpecializedReplaceableSetter(CGSpecializedSetter):
assert all(ord(c) < 128 for c in name)
return CGGeneric("""\
JS_DefineProperty(cx, obj, %s as *const u8 as *const libc::c_char,
- args.get(0), JSPROP_ENUMERATE, None, None)""" % name)
+ HandleValue::from_raw(args.get(0)), JSPROP_ENUMERATE, None, None)""" % name)
class CGMemberJITInfo(CGThing):
@@ -5514,7 +5514,7 @@ if !JS_WrapObject(cx, element.handle_mut()) {
JS_SetPrototype(cx, element.handle(), prototype.handle());
-(result).to_jsval(cx, args.rval());
+(result).to_jsval(cx, MutableHandleValue::from_raw(args.rval()));
return true;
""" % self.descriptor.name)
else:
diff --git a/components/script/dom/bindings/reflector.rs b/components/script/dom/bindings/reflector.rs
index 953348b2d75..416c3c3f552 100644
--- a/components/script/dom/bindings/reflector.rs
+++ b/components/script/dom/bindings/reflector.rs
@@ -48,7 +48,7 @@ impl Reflector {
#[inline]
pub fn get_jsobject(&self) -> HandleObject {
// We're rooted, so it's safe to hand out a handle to object in Heap
- unsafe { self.object.handle() }
+ unsafe { HandleObject::from_raw(self.object.handle()) }
}
/// Initialize the reflector. (May be called only once.)
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index a12d9f5140a..794a3618820 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -798,7 +798,7 @@ impl<T> RootedTraceableBox<Heap<T>>
T: GCMethods + Copy,
{
pub fn handle(&self) -> Handle<T> {
- unsafe { (*self.ptr).handle() }
+ unsafe { Handle::from_raw((*self.ptr).handle()) }
}
}
diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs
index 98fc1eae5bd..b4a07750f7a 100644
--- a/components/script/dom/customelementregistry.rs
+++ b/components/script/dom/customelementregistry.rs
@@ -32,7 +32,7 @@ use js::glue::UnwrapObject;
use js::jsapi::{Heap, IsCallable, IsConstructor, HandleValueArray};
use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue};
-use js::rust::{HandleObject, MutableHandleValue};
+use js::rust::{HandleObject, HandleValue, MutableHandleValue};
use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue};
use microtask::Microtask;
use script_thread::ScriptThread;
@@ -612,7 +612,7 @@ impl CustomElementReaction {
CustomElementReaction::Upgrade(ref definition) => upgrade_element(definition.clone(), element),
CustomElementReaction::Callback(ref callback, ref arguments) => {
// We're rooted, so it's safe to hand out a handle to objects in Heap
- let arguments = arguments.iter().map(|arg| unsafe { arg.handle() }).collect();
+ let arguments = arguments.iter().map(|arg| unsafe { HandleValue::from_raw(arg.handle()) }).collect();
let _ = callback.Call_(&*element, arguments, ExceptionHandling::Report);
}
}
diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs
index 51f9a42c06c..1f3b652b0e9 100644
--- a/components/script/dom/history.rs
+++ b/components/script/dom/history.rs
@@ -120,7 +120,7 @@ impl History {
PopStateEvent::dispatch_jsval(
self.window.upcast::<EventTarget>(),
&*self.window,
- unsafe { self.state.handle() }
+ unsafe { HandleValue::from_raw(self.state.handle()) }
);
}
diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs
index c96f9fd2baf..1a4300a2b45 100644
--- a/components/script/dom/promise.rs
+++ b/components/script/dom/promise.rs
@@ -258,8 +258,10 @@ unsafe extern fn native_handler_callback(cx: *mut JSContext, argc: u32, vp: *mut
rooted!(in(cx) let v = *GetFunctionNativeReserved(args.callee(), SLOT_NATIVEHANDLER_TASK));
match v.to_int32() {
- v if v == NativeHandlerTask::Resolve as i32 => handler.resolved_callback(cx, args.get(0)),
- v if v == NativeHandlerTask::Reject as i32 => handler.rejected_callback(cx, args.get(0)),
+ v if v == NativeHandlerTask::Resolve as i32 =>
+ handler.resolved_callback(cx, HandleValue::from_raw(args.get(0))),
+ v if v == NativeHandlerTask::Reject as i32 =>
+ handler.rejected_callback(cx, HandleValue::from_raw(args.get(0))),
_ => panic!("unexpected native handler task value"),
};
diff --git a/components/script/timers.rs b/components/script/timers.rs
index 202a8edc8ae..2bcf2b478e9 100644
--- a/components/script/timers.rs
+++ b/components/script/timers.rs
@@ -522,6 +522,6 @@ impl JsTimerTask {
// always done via rooted JsTimers, which is safe.
#[allow(unsafe_code)]
fn collect_heap_args<'b>(&self, args: &'b [Heap<JSVal>]) -> Vec<HandleValue<'b>> {
- args.iter().map(|arg| unsafe { arg.handle() }).collect()
+ args.iter().map(|arg| unsafe { HandleValue::from_raw(arg.handle()) }).collect()
}
}
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index d6b38c35156..9387535ec81 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -478,6 +478,7 @@ class CommandBase(object):
return path.join(msvc_deps_dir, package, msvc_deps[package])
extra_path += [path.join(package_dir("cmake"), "bin")]
+ extra_path += [path.join(package_dir("llvm"), "bin")]
extra_path += [path.join(package_dir("ninja"), "bin")]
# Link openssl
env["OPENSSL_INCLUDE_DIR"] = path.join(package_dir("openssl"), "include")
@@ -485,6 +486,8 @@ class CommandBase(object):
env["OPENSSL_LIBS"] = "libsslMD:libcryptoMD"
# Link moztools
env["MOZTOOLS_PATH"] = path.join(package_dir("moztools"), "bin")
+ # Link LLVM
+ env["LIBCLANG_PATH"] = path.join(package_dir("llvm"), "lib")
if is_windows():
if not os.environ.get("NATIVE_WIN32_PYTHON"):
diff --git a/python/servo/packages.py b/python/servo/packages.py
index d368c91504c..da779051cb9 100644
--- a/python/servo/packages.py
+++ b/python/servo/packages.py
@@ -4,6 +4,7 @@
WINDOWS_MSVC = {
"cmake": "3.7.2",
+ "llvm": "4.0.0",
"moztools": "0.0.1-5",
"ninja": "1.7.1",
"openssl": "1.1.0e-vs2015",