From 1b5cd6001e0a5d484c26a9f0a8b0d4dca624f753 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 22 Sep 2016 16:53:53 +0200 Subject: [PATCH] Wrap uses of extern statics in unsafe blocks. This fixes safe_extern_statics warnings; see . --- mozjs/js/rust/src/rust.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozjs/js/rust/src/rust.rs b/mozjs/js/rust/src/rust.rs index d6967aa3db3..d6e44af72c0 100644 --- a/mozjs/js/rust/src/rust.rs +++ b/mozjs/js/rust/src/rust.rs @@ -482,6 +482,10 @@ impl Default for jsid { } } +impl Default for JS::Value { + fn default() -> JS::Value { jsval::UndefinedValue() } +} + impl Default for JS::CompartmentOptions { fn default() -> Self { unsafe { ::std::mem::zeroed() } } }