mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Merge pull request #3240 from Ms2ger/mark-null
Avoid trying to trace a null JSVal; r=jdm
This commit is contained in:
commit
2c0b66a782
2 changed files with 8 additions and 1 deletions
|
@ -68,7 +68,7 @@ pub trait JSTraceable {
|
||||||
|
|
||||||
/// Trace a `JSVal`.
|
/// Trace a `JSVal`.
|
||||||
pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: JSVal) {
|
pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: JSVal) {
|
||||||
if !val.is_gcthing() {
|
if !val.is_markable() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
src/test/content/test_trace_null.html
Normal file
7
src/test/content/test_trace_null.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<!-- crashtest -->
|
||||||
|
<script src=harness.js></script>
|
||||||
|
<script>
|
||||||
|
new CustomEvent("foo", { detail: null });
|
||||||
|
gc();
|
||||||
|
finish();
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue