File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,6 @@ const WHITELIST_VARS: &'static [&'static str] = &[
286
286
"JSCLASS_.*" ,
287
287
"JSFUN_.*" ,
288
288
"JSITER_.*" ,
289
- "JSID_VOID" ,
290
289
"JSPROP_.*" ,
291
290
"JS_.*" ,
292
291
] ;
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ use jsapi::JS;
6
6
use jsapi:: jsid;
7
7
use jsapi:: JSFlatString ;
8
8
use jsapi:: JSFunction ;
9
- use jsapi:: JSID_VOID ;
10
9
use jsapi:: JSObject ;
11
10
use jsapi:: JSScript ;
12
11
use jsapi:: JSString ;
13
12
use jsapi:: JSTracer ;
13
+ use jsid:: JSID_VOID ;
14
14
15
15
use std:: cell:: UnsafeCell ;
16
16
use std:: mem;
Original file line number Diff line number Diff line change
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
+
5
+ use jsapi:: jsid;
6
+
7
+ // No symbol generated for implicitly initialized constexpr, so we
8
+ // need to duplicate the necessary values.
9
+ pub const JSID_TYPE_VOID : usize = 0x02 ;
10
+ pub const JSID_VOID : jsid = jsid { asBits : JSID_TYPE_VOID } ;
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ use jsapi::JSAutoRealm;
7
7
use jsapi:: JSContext ;
8
8
use jsapi:: JSErrNum ;
9
9
use jsapi:: JSFunctionSpec ;
10
- use jsapi:: JSID_VOID ;
11
10
use jsapi:: JSJitGetterCallArgs ;
12
11
use jsapi:: JSJitMethodCallArgs ;
13
12
use jsapi:: JSJitSetterCallArgs ;
@@ -19,6 +18,7 @@ use jsapi::glue::JS_ForOfIteratorInit;
19
18
use jsapi:: glue:: JS_ForOfIteratorNext ;
20
19
use jsapi:: jsid;
21
20
use jsgc:: RootKind ;
21
+ use jsid:: JSID_VOID ;
22
22
use jsval:: UndefinedValue ;
23
23
24
24
#[ cfg( feature = "debugmozjs" ) ]
@@ -52,7 +52,7 @@ impl<T> DerefMut for JS::MutableHandle<T> {
52
52
}
53
53
54
54
impl Default for jsid {
55
- fn default ( ) -> Self { unsafe { JSID_VOID } }
55
+ fn default ( ) -> Self { JSID_VOID }
56
56
}
57
57
58
58
impl Default for JS :: RealmOptions {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ mod jsimpls;
11
11
12
12
// Modules with public definitions
13
13
pub mod jsgc;
14
+ pub mod jsid;
14
15
pub mod jsjit;
15
16
pub mod jsval;
16
17
You can’t perform that action at this time.
0 commit comments