Skip to content

Commit add34bd

Browse files
Ms2gerfitzgen
authored andcommitted
Wrap uses of extern statics in unsafe blocks.
This fixes safe_extern_statics warnings; see <rust-lang/rust#36247>.
1 parent 478305b commit add34bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mozjs/js/rust/src/rust.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,10 @@ impl Default for jsid {
482482
}
483483
}
484484

485+
impl Default for JS::Value {
486+
fn default() -> JS::Value { jsval::UndefinedValue() }
487+
}
488+
485489
impl Default for JS::CompartmentOptions {
486490
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
487491
}

0 commit comments

Comments
 (0)