Avoid trying to trace a null JSVal.

JSVal::trace_kind() asserts that it is a markable type; null is a gcthing that
is not markable.
This commit is contained in:
Ms2ger 2014-09-07 12:42:19 +02:00
parent 0d202b6bda
commit 2d2674e346
2 changed files with 8 additions and 1 deletions

View file

@ -68,7 +68,7 @@ pub trait JSTraceable {
/// Trace a `JSVal`.
pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: JSVal) {
if !val.is_gcthing() {
if !val.is_markable() {
return;
}

View file

@ -0,0 +1,7 @@
<!-- crashtest -->
<script src=harness.js></script>
<script>
new CustomEvent("foo", { detail: null });
gc();
finish();
</script>