Closed Bug 1530251 Opened 1 year ago Closed 4 months ago

Don't set JSGC_MAX_NURSERY_BYTES in GCRuntime::init

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

These parameters are set in GCRuntime::init, but all the others have compiled-in defaults and then allow embedders to call setParameter themselves. Can we do this with at least GC_MAX_NURSERY_BYTES? if not both of these parameters?

NI the GC team to see what we think.

Flags: needinfo?(sphink)
Flags: needinfo?(jcoppeard)
Flags: needinfo?(allstars.chh)

(In reply to Paul Bone [:pbone] from comment #1)
What do callers do at the moment? If most callers pass in the same values (I suspect they might) then let's remove the parameters and make that value the default.

Flags: needinfo?(jcoppeard)

Note bug 1509318 though - currently GC parameters are specified as a uint32_t which won't work for setting a large heap size in bytes.

Here's all the eventual callers:

https://searchfox.org/mozilla-central/search?q=symbol:_Z13JS_NewContextjjP9JSRuntime&redirect=false

Quite a few use default values, but some, such as worker initialisation use different, smaller values. I think it may be best to keep JS_NewContext how it is, maybe provide an overloaded JS_NewContext without these parameters, and remove these parameters from the init functions it calls. Oh, and change the first argument from uint32_t to size_t.

Next question, should the maxumum nursery size argument be removed completely. For example web workers (service workers I guess?) limit their nursery size (eg 2MB rather than 16MB). This doesn't change their initial size, just how big they can grow. Maybe doing this for workers is perfect because AFAIK throughput is less important there but we can save this peak memory use. NI tcampbell since he may have some ideas here.

Blocks: 1509318
Flags: needinfo?(tcampbell)
Flags: needinfo?(sphink)
Flags: needinfo?(allstars.chh)
Priority: -- → P3

I don't have particular insights right now, so clearing needinfo. When this work gets revisited we can reassess the situation.

Flags: needinfo?(tcampbell)
Assignee: nobody → pbone
Status: NEW → ASSIGNED

Callers should use JS_SetGCParameter() instead.

Depends on D47869

Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42913778b66a
Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
https://hg.mozilla.org/integration/autoland/rev/e03401a358a6
Remove nursery size parameter from GCRuntime::init r=jonco

I haven't removed the maximum heap size parameter, there are more situations when a caller may wish to set it. The only reason I can see to "demote" it to a JS_SetGCParameter() is to make it equal to other parameters, including the maximum malloc memory the GC may refer to. Unless someone says otherwise I'll leave it as a parameter, I don't mind.

Flags: needinfo?(jcoppeard)
Summary: Don't set GC_MAX_BYTES or GC_MAX_NURSERY_BYTES in GCRuntime::init → Don't set JSGC_MAX_NURSERY_BYTES in GCRuntime::init
Backout by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e984f54259d
Backed out 2 changesets for rust failures CLOSED TREE

Backed out 2 changesets (Bug 1530251) for rust failure

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&fromchange=e03401a358a6940b5402d82f210981e9d0027e71&tochange=4e984f54259d60d6bdb6dab40c2ffd6d263e2737&selectedJob=269406653

Backout link: https://hg.mozilla.org/integration/autoland/rev/4e984f54259d60d6bdb6dab40c2ffd6d263e2737

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=269406653&repo=autoland&lineNumber=282

[task 2019-10-02T11:36:13.788Z] Running rustc --crate-name js js/rust/src/lib.rs --color never --emit=dep-info,link -C debuginfo=2 --test --cfg 'feature="debugmozjs"' -C metadata=02772df0b6e4a626 -C extra-filename=-02772df0b6e4a626 --out-dir /builds/worker/workspace/build/src/target/debug/deps -C incremental=/builds/worker/workspace/build/src/target/debug/incremental -L dependency=/builds/worker/workspace/build/src/target/debug/deps --extern lazy_static=/builds/worker/workspace/build/src/target/debug/deps/liblazy_static-5c07828678bf7b8c.rlib --extern libc=/builds/worker/workspace/build/src/target/debug/deps/liblibc-c6f1c09ba449349b.rlib --extern log=/builds/worker/workspace/build/src/target/debug/deps/liblog-d73daa2358e2c210.rlib --extern mozjs_sys=/builds/worker/workspace/build/src/target/debug/deps/libmozjs_sys-d68a87a219502f0f.rlib --extern num_traits=/builds/worker/workspace/build/src/target/debug/deps/libnum_traits-4af09880d470d4fe.rlib -L native=/builds/worker/workspace/build/src/target/debug/build/js-76af953b9efb3903/out/lib -l static=jsglue -L native=/builds/worker/workspace/build/src/target/debug/build/mozjs_sys-417e159384e03e07/out/js/src/build -L native=/builds/worker/workspace/build/src/target/debug/build/mozjs_sys-417e159384e03e07/out/js/src -L native=/builds/worker/workspace/build/src/target/debug/build/mozjs_sys-417e159384e03e07/out/x86_64-unknown-linux-gnu/debug -L native=/builds/worker/workspace/build/src/target/debug/build/mozjs_sys-417e159384e03e07/out/dist/bin -L native=/usr/lib/x86_64-linux-gnu
[task 2019-10-02T11:36:13.976Z] warning: trait objects without an explicit dyn are deprecated
[task 2019-10-02T11:36:13.976Z] --> js/rust/src/panic.rs:9:55
[task 2019-10-02T11:36:13.976Z] |
[task 2019-10-02T11:36:13.976Z] 9 | thread_local!(static PANIC_RESULT: RefCell<Option<Box<Any + Send>>> = RefCell::new(None));
[task 2019-10-02T11:36:13.976Z] | ^^^^^^^^^^ help: use dyn: dyn Any + Send
[task 2019-10-02T11:36:13.976Z] |
[task 2019-10-02T11:36:13.976Z] = note: #[warn(bare_trait_objects)] on by default
[task 2019-10-02T11:36:13.976Z]
[task 2019-10-02T11:36:13.976Z] warning: trait objects without an explicit dyn are deprecated
[task 2019-10-02T11:36:13.976Z] --> js/rust/src/panic.rs:9:55
[task 2019-10-02T11:36:13.976Z] |
[task 2019-10-02T11:36:13.976Z] 9 | thread_local!(static PANIC_RESULT: RefCell<Option<Box<Any + Send>>> = RefCell::new(None));
[task 2019-10-02T11:36:13.976Z] | ^^^^^^^^^^ help: use dyn: dyn Any + Send
[task 2019-10-02T11:36:13.976Z]
[task 2019-10-02T11:36:14.173Z] warning: trait objects without an explicit dyn are deprecated
[task 2019-10-02T11:36:14.173Z] --> js/rust/src/panic.rs:9:55
[task 2019-10-02T11:36:14.173Z] |
[task 2019-10-02T11:36:14.173Z] 9 | thread_local!(static PANIC_RESULT: RefCell<Option<Box<Any + Send>>> = RefCell::new(None));
[task 2019-10-02T11:36:14.173Z] | ^^^^^^^^^^ help: use dyn: dyn Any + Send
[task 2019-10-02T11:36:14.173Z] |
[task 2019-10-02T11:36:14.173Z] = note: #[warn(bare_trait_objects)] on by default
[task 2019-10-02T11:36:14.173Z]
[task 2019-10-02T11:36:14.173Z] warning: trait objects without an explicit dyn are deprecated
[task 2019-10-02T11:36:14.173Z] --> js/rust/src/panic.rs:9:55
[task 2019-10-02T11:36:14.173Z] |
[task 2019-10-02T11:36:14.173Z] 9 | thread_local!(static PANIC_RESULT: RefCell<Option<Box<Any + Send>>> = RefCell::new(None));
[task 2019-10-02T11:36:14.173Z] | ^^^^^^^^^^ help: use dyn: dyn Any + Send
[task 2019-10-02T11:36:14.173Z]
[task 2019-10-02T11:36:14.455Z] error[E0061]: this function takes 2 parameters but 3 parameters were supplied
[task 2019-10-02T11:36:14.455Z] --> js/rust/src/rust.rs:139:35
[task 2019-10-02T11:36:14.455Z] |
[task 2019-10-02T11:36:14.455Z] 139 | let context = JS_NewContext(
[task 2019-10-02T11:36:14.455Z] | ___________________________________^
[task 2019-10-02T11:36:14.455Z] 140 | | DEFAULT_HEAPSIZE, ChunkSize as u32, ptr::null_mut());
[task 2019-10-02T11:36:14.455Z] | |____________________________________________________________________________^ expected 2 parameters
[task 2019-10-02T11:36:14.455Z] |
[task 2019-10-02T11:36:14.455Z] ::: /builds/worker/workspace/build/src/target/debug/build/js-02994089cda69057/out/jsapi_debug.rs:10:271109
[task 2019-10-02T11:36:14.455Z] |
[task 2019-10-02T11:36:14.456Z] 10 | # [ allow ( non_snake_case , non_camel_case_types , non_upper_case_globals ) ] pub mod root { # [ repr ( C ) ] # [ derive ( Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd ) ] pub struct __BindgenBitfieldUnit < Storage , Align > { storage : Storage , align : [ Align ; 0 ] , } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > { # [ inline ] pub fn new ( storage : Storage ) -> Self { Self { storage , align : [ ] } } } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > where Storage : AsRef < [ u8 ] > + AsMut < [ u8 ] >, { # [ inline ] pub fn get_bit ( & self , index : usize ) -> bool { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = self . storage . as_ref ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [ inline ] pub fn set_bit ( & mut self , index : usize , val : bool ) { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [ inline ] pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; let mut val = 0 ; for i in 0 .. ( bit_width as usize ) { if self . get_bit ( i + bit_offset ) { let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [ inline ] pub fn set ( & mut self , bit_offset : usize , bit_width : u8 , val : u64 ) { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; for i in 0 .. ( bit_width as usize ) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; self . set_bit ( index + bit_offset , val_bit_is_set ) ; } } } # [ allow ( unused_imports ) ] use self :: super :: root ; pub const JSID_TYPE_VOID : u32 = 2 ; pub const JSITER_OWNONLY : u32 = 8 ; pub const JSITER_HIDDEN : u32 = 16 ; pub const JSITER_SYMBOLS : u32 = 32 ; pub const JSITER_SYMBOLSONLY : u32 = 64 ; pub const JSITER_FORAWAITOF : u32 = 128 ; pub const JS_STRUCTURED_CLONE_VERSION : u32 = 8 ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type FILE = root :: _IO_FILE ; pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct _IO_marker { pub _next : * mut root :: _IO_marker , pub _sbuf : * mut root :: _IO_FILE , pub _pos : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout__IO_marker ( ) { assert_eq ! ( :: std :: mem :: size_of :: < _IO_marker > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( _IO_marker ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < _IO_marker > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _IO_marker ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_marker > ( ) ) ) . _next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _IO_marker ) , "::" , stringify ! ( _next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_marker > ( ) ) ) . _sbuf as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( _IO_marker ) , "::" , stringify ! ( _sbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_marker > ( ) ) ) . _pos as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( _IO_marker ) , "::" , stringify ! ( _pos ) ) ) ; } impl Clone for _IO_marker { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct _IO_FILE { pub _flags : :: std :: os :: raw :: c_int , pub _IO_read_ptr : * mut :: std :: os :: raw :: c_char , pub _IO_read_end : * mut :: std :: os :: raw :: c_char , pub _IO_read_base : * mut :: std :: os :: raw :: c_char , pub _IO_write_base : * mut :: std :: os :: raw :: c_char , pub _IO_write_ptr : * mut :: std :: os :: raw :: c_char , pub _IO_write_end : * mut :: std :: os :: raw :: c_char , pub _IO_buf_base : * mut :: std :: os :: raw :: c_char , pub _IO_buf_end : * mut :: std :: os :: raw :: c_char , pub _IO_save_base : * mut :: std :: os :: raw :: c_char , pub _IO_backup_base : * mut :: std :: os :: raw :: c_char , pub _IO_save_end : * mut :: std :: os :: raw :: c_char , pub _markers : * mut root :: _IO_marker , pub _chain : * mut root :: _IO_FILE , pub _fileno : :: std :: os :: raw :: c_int , pub _flags2 : :: std :: os :: raw :: c_int , pub _old_offset : root :: __off_t , pub _cur_column : :: std :: os :: raw :: c_ushort , pub _vtable_offset : :: std :: os :: raw :: c_schar , pub _shortbuf : [ :: std :: os :: raw :: c_char ; 1usize ] , pub _lock : * mut root :: _IO_lock_t , pub _offset : root :: __off64_t , pub __pad1 : * mut :: std :: os :: raw :: c_void , pub __pad2 : * mut :: std :: os :: raw :: c_void , pub __pad3 : * mut :: std :: os :: raw :: c_void , pub __pad4 : * mut :: std :: os :: raw :: c_void , pub __pad5 : usize , pub _mode : :: std :: os :: raw :: c_int , pub _unused2 : [ :: std :: os :: raw :: c_char ; 20usize ] , } # [ test ] fn bindgen_test_layout__IO_FILE ( ) { assert_eq ! ( :: std :: mem :: size_of :: < _IO_FILE > ( ) , 216usize , concat ! ( "Size of: " , stringify ! ( _IO_FILE ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < _IO_FILE > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( _IO_FILE ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _flags as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_ptr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_end as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_read_base as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_read_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_base as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_ptr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_write_end as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_write_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_buf_base as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_buf_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_buf_end as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_buf_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_save_base as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_save_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_backup_base as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_backup_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _IO_save_end as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _IO_save_end ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _markers as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _markers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _chain as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _chain ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _fileno as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _fileno ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _flags2 as * const _ as usize } , 116usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _flags2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _old_offset as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _old_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _cur_column as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _cur_column ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _vtable_offset as * const _ as usize } , 130usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _vtable_offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _shortbuf as * const _ as usize } , 131usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _shortbuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _lock as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _lock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _offset as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad1 as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad2 as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad3 as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad4 as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . __pad5 as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( __pad5 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _mode as * const _ as usize } , 192usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _mode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < _IO_FILE > ( ) ) ) . _unused2 as * const _ as usize } , 196usize , concat ! ( "Offset of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _unused2 ) ) ) ; } impl Clone for _IO_FILE { fn clone ( & self ) -> Self { * self } } pub mod std { # [ allow ( unused_imports ) ] use self :: super :: super :: root ; pub type conditional_type < _Iftrue > = _Iftrue ; # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct input_iterator_tag { pub _address : u8 , } # [ test ] fn bindgen_test_layout_input_iterator_tag ( ) { assert_eq ! ( :: std :: mem :: size_of :: < input_iterator_tag > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( input_iterator_tag ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < input_iterator_tag > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( input_iterator_tag ) ) ) ; } impl Clone for input_iterator_tag { fn clone ( & self ) -> Self { * self } } } pub mod __gnu_cxx { # [ allow ( unused_imports ) ] use self :: super :: super :: root ; } pub mod mozilla { # [ allow ( unused_imports ) ] use self :: super :: super :: root ; pub mod detail { # [ allow ( unused_imports ) ] use self :: super :: super :: super :: root ; # [ repr ( C ) ] # [ derive ( Debug ) ] pub struct GuardObjectNotifier { pub mStatementDone : * mut bool , } # [ test ] fn bindgen_test_layout_GuardObjectNotifier ( ) { assert_eq ! ( :: std :: mem :: size_of :: < GuardObjectNotifier > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( GuardObjectNotifier ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < GuardObjectNotifier > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( GuardObjectNotifier ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < GuardObjectNotifier > ( ) ) ) . mStatementDone as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( GuardObjectNotifier ) , "::" , stringify ! ( mStatementDone ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug ) ] pub struct GuardObjectNotificationReceiver { pub mStatementDone : bool , } # [ test ] fn bindgen_test_layout_GuardObjectNotificationReceiver ( ) { assert_eq ! ( :: std :: mem :: size_of :: < GuardObjectNotificationReceiver > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( GuardObjectNotificationReceiver ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < GuardObjectNotificationReceiver > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( GuardObjectNotificationReceiver ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < GuardObjectNotificationReceiver > ( ) ) ) . mStatementDone as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( GuardObjectNotificationReceiver ) , "::" , stringify ! ( mStatementDone ) ) ) ; } # [ doc = " LinkedList supports refcounted elements using this adapter class. Clients" ] # [ doc = " using LinkedList<RefPtr<T>> will get a data structure that holds a strong" ] # [ doc = " reference to T as long as T is in the list." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct LinkedListElementTraits { pub _address : u8 , } pub type LinkedListElementTraits_RawType < T > = * mut T ; pub type LinkedListElementTraits_ConstRawType < T > = * const T ; pub type LinkedListElementTraits_ClientType < T > = * mut T ; pub type LinkedListElementTraits_ConstClientType < T > = * const T ; } pub type MallocSizeOf = :: std :: option :: Option < unsafe extern "C" fn ( p : * const :: std :: os :: raw :: c_void ) -> usize > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ReverseIterator < IteratorT > { pub mCurrent : IteratorT , pub _phantom_0 : :: std :: marker :: PhantomData < :: std :: cell :: UnsafeCell < IteratorT > > , } pub type Array_iterator < T > = * mut T ; pub type Array_const_iterator < T > = * const T ; pub type Array_reverse_iterator < T > = root :: mozilla :: ReverseIterator < T > ; pub type Array_const_reverse_iterator < T > = root :: mozilla :: ReverseIterator < T > ; pub type EnumeratedArray_ArrayType = u8 ; pub type EnumeratedArray_iterator = root :: mozilla :: EnumeratedArray_ArrayType ; pub type EnumeratedArray_const_iterator = root :: mozilla :: EnumeratedArray_ArrayType ; pub type EnumeratedArray_reverse_iterator = root :: mozilla :: EnumeratedArray_ArrayType ; pub type EnumeratedArray_const_reverse_iterator = root :: mozilla :: EnumeratedArray_ArrayType ; # [ doc = " UniquePtr is a smart pointer that wholly owns a resource. Ownership may be" ] # [ doc = " transferred out of a UniquePtr through explicit action, but otherwise the" ] # [ doc = " resource is destroyed when the UniquePtr is destroyed." ] # [ doc = "" ] # [ doc = " UniquePtr is similar to C++98's std::auto_ptr, but it improves upon auto_ptr" ] # [ doc = " in one crucial way: it's impossible to copy a UniquePtr. Copying an auto_ptr" ] # [ doc = " obviously can't copy ownership of its singly-owned resource. So what" ] # [ doc = " happens if you try to copy one? Bizarrely, ownership is implicitly" ] # [ doc = " transferred, preserving single ownership but breaking code that assumes a" ] # [ doc = " copy of an object is identical to the original. (This is why auto_ptr is" ] # [ doc = " prohibited in STL containers.)" ] # [ doc = "" ] # [ doc = " UniquePtr solves this problem by being movable rather than copyable." ] # [ doc = " Instead of passing a |UniquePtr u| directly to the constructor or assignment" ] # [ doc = " operator, you pass |Move(u)|. In doing so you indicate that you're moving" ] # [ doc = " ownership out of |u|, into the target of the construction/assignment. After" ] # [ doc = " the transfer completes, |u| contains |nullptr| and may be safely destroyed." ] # [ doc = " This preserves single ownership but also allows UniquePtr to be moved by" ] # [ doc = " algorithms that have been made move-safe. (Note: if |u| is instead a" ] # [ doc = " temporary expression, don't use |Move()|: just pass the expression, because" ] # [ doc = " it's already move-ready. For more information see Move.h.)" ] # [ doc = "" ] # [ doc = " UniquePtr is also better than std::auto_ptr in that the deletion operation is" ] # [ doc = " customizable. An optional second template parameter specifies a class that" ] # [ doc = " (through its operator()(T*)) implements the desired deletion policy. If no" ] # [ doc = " policy is specified, mozilla::DefaultDelete<T> is used -- which will either" ] # [ doc = " |delete| or |delete[]| the resource, depending whether the resource is an" ] # [ doc = " array. Custom deletion policies ideally should be empty classes (no member" ] # [ doc = " fields, no member fields in base classes, no virtual methods/inheritance)," ] # [ doc = " because then UniquePtr can be just as efficient as a raw pointer." ] # [ doc = "" ] # [ doc = " Use of UniquePtr proceeds like so:" ] # [ doc = "" ] # [ doc = " UniquePtr<int> g1; // initializes to nullptr" ] # [ doc = " g1.reset(new int); // switch resources using reset()" ] # [ doc = " g1 = nullptr; // clears g1, deletes the int" ] # [ doc = "" ] # [ doc = " UniquePtr<int> g2(new int); // owns that int" ] # [ doc = " int* p = g2.release(); // g2 leaks its int -- still requires deletion" ] # [ doc = " delete p; // now freed" ] # [ doc = "" ] # [ doc = " struct S { int x; S(int x) : x(x) {} };" ] # [ doc = " UniquePtr<S> g3, g4(new S(5));" ] # [ doc = " g3 = std::move(g4); // g3 owns the S, g4 cleared" ] # [ doc = " S* p = g3.get(); // g3 still owns |p|" ] # [ doc = " assert(g3->x == 5); // operator-> works (if .get() != nullptr)" ] # [ doc = " assert((g3).x == 5); // also operator (again, if not cleared)" ] # [ doc = " Swap(g3, g4); // g4 now owns the S, g3 cleared" ] # [ doc = " g3.swap(g4); // g3 now owns the S, g4 cleared" ] # [ doc = " UniquePtr<S> g5(std::move(g3)); // g5 owns the S, g3 cleared" ] # [ doc = " g5.reset(); // deletes the S, g5 cleared" ] # [ doc = "" ] # [ doc = " struct FreePolicy { void operator()(void* p) { free(p); } };" ] # [ doc = " UniquePtr<int, FreePolicy> g6(static_cast<int*>(malloc(sizeof(int))));" ] # [ doc = " int* ptr = g6.get();" ] # [ doc = " g6 = nullptr; // calls free(ptr)" ] # [ doc = "" ] # [ doc = " Now, carefully note a few things you can't do:" ] # [ doc = "" ] # [ doc = " UniquePtr<int> b1;" ] # [ doc = " b1 = new int; // BAD: can only assign another UniquePtr" ] # [ doc = " int* ptr = b1; // BAD: no auto-conversion to pointer, use get()" ] # [ doc = "" ] # [ doc = " UniquePtr<int> b2(b1); // BAD: can't copy a UniquePtr" ] # [ doc = " UniquePtr<int> b3 = b1; // BAD: can't copy-assign a UniquePtr" ] # [ doc = "" ] # [ doc = " (Note that changing a UniquePtr to store a direct |new| expression is" ] # [ doc = " permitted, but usually you should use MakeUnique, defined at the end of this" ] # [ doc = " header.)" ] # [ doc = "" ] # [ doc = " A few miscellaneous notes:" ] # [ doc = "" ] # [ doc = " UniquePtr, when not instantiated for an array type, can be move-constructed" ] # [ doc = " and move-assigned, not only from itself but from "derived" UniquePtr<U, E>" ] # [ doc = " instantiations where U converts to T and E converts to D. If you want to use" ] # [ doc = " this, you're going to have to specify a deletion policy for both UniquePtr" ] # [ doc = " instantations, and T pretty much has to have a virtual destructor. In other" ] # [ doc = " words, this doesn't work:" ] # [ doc = "" ] # [ doc = " struct Base { virtual ~Base() {} };" ] # [ doc = " struct Derived : Base {};" ] # [ doc = "" ] # [ doc = " UniquePtr<Base> b1;" ] # [ doc = " // BAD: DefaultDelete<Base> and DefaultDelete<Derived> don't interconvert" ] # [ doc = " UniquePtr<Derived> d1(std::move(b));" ] # [ doc = "" ] # [ doc = " UniquePtr<Base> b2;" ] # [ doc = " UniquePtr<Derived, DefaultDelete<Base>> d2(std::move(b2)); // okay" ] # [ doc = "" ] # [ doc = " UniquePtr is specialized for array types. Specializing with an array type" ] # [ doc = " creates a smart-pointer version of that array -- not a pointer to such an" ] # [ doc = " array." ] # [ doc = "" ] # [ doc = " UniquePtr<int[]> arr(new int[5]);" ] # [ doc = " arr[0] = 4;" ] # [ doc = "" ] # [ doc = " What else is different? Deletion of course uses |delete[]|. An operator[]" ] # [ doc = " is provided. Functionality that doesn't make sense for arrays is removed." ] # [ doc = " The constructors and mutating methods only accept array pointers (not T*, U*" ] # [ doc = " that converts to T*, or UniquePtr<U[]> or UniquePtr<U>) or |nullptr|." ] # [ doc = "" ] # [ doc = " It's perfectly okay for a function to return a UniquePtr. This transfers" ] # [ doc = " the UniquePtr's sole ownership of the data, to the fresh UniquePtr created" ] # [ doc = " in the calling function, that will then solely own that data. Such functions" ] # [ doc = " can return a local variable UniquePtr, |nullptr|, |UniquePtr(ptr)| where" ] # [ doc = " |ptr| is a |T*|, or a UniquePtr |Move()|'d from elsewhere." ] # [ doc = "" ] # [ doc = " UniquePtr will commonly be a member of a class, with lifetime equivalent to" ] # [ doc = " that of that class. If you want to expose the related resource, you could" ] # [ doc = " expose a raw pointer via |get()|, but ownership of a raw pointer is" ] # [ doc = " inherently unclear. So it's better to expose a |const UniquePtr&| instead." ] # [ doc = " This prohibits mutation but still allows use of |get()| when needed (but" ] # [ doc = " operator-> is preferred). Of course, you can only use this smart pointer as" ] # [ doc = " long as the enclosing class instance remains live -- no different than if you" ] # [ doc = " exposed the |get()| raw pointer." ] # [ doc = "" ] # [ doc = " To pass a UniquePtr-managed resource as a pointer, use a |const UniquePtr&|" ] # [ doc = " argument. To specify an inout parameter (where the method may or may not" ] # [ doc = " take ownership of the resource, or reset it), or to specify an out parameter" ] # [ doc = " (where simply returning a |UniquePtr| isn't possible), use a |UniquePtr&|" ] # [ doc = " argument. To unconditionally transfer ownership of a UniquePtr" ] # [ doc = " into a method, use a |UniquePtr| argument. To conditionally transfer" ] # [ doc = " ownership of a resource into a method, should the method want it, use a" ] # [ doc = " |UniquePtr&&| argument." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct UniquePtr { pub _address : u8 , } pub type UniquePtr_ElementType = u8 ; pub type UniquePtr_DeleterType = u8 ; pub type UniquePtr_Pointer = u8 ; # [ doc = " A code unit within a UTF-8 encoded string. (A code unit is the smallest" ] # [ doc = " unit within the Unicode encoding of a string. For UTF-8 this is an 8-bit" ] # [ doc = " number; for UTF-16 it would be a 16-bit number.)" ] # [ doc = "" ] # [ doc = " This is not the same as a single code point: in UTF-8, non-ASCII code" ] # [ doc = " points are constituted by multiple code units." ] # [ repr ( C ) ] # [ derive ( Copy ) ] pub union Utf8Unit { pub mValue : :: std :: os :: raw :: c_char , _bindgen_union_align : u8 , } # [ test ] fn bindgen_test_layout_Utf8Unit ( ) { assert_eq ! ( :: std :: mem :: size_of :: < Utf8Unit > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( Utf8Unit ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < Utf8Unit > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( Utf8Unit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Utf8Unit > ( ) ) ) . mValue as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Utf8Unit ) , "::" , stringify ! ( mValue ) ) ) ; } impl Clone for Utf8Unit { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug ) ] pub struct LinkedListElement { pub mNext : * mut root :: mozilla :: LinkedListElement , pub mPrev : * mut root :: mozilla :: LinkedListElement , pub mIsSentinel : bool , } pub type LinkedListElement_Traits = root :: mozilla :: detail :: LinkedListElementTraits ; pub type LinkedListElement_RawType = root :: mozilla :: LinkedListElement_Traits ; pub type LinkedListElement_ConstRawType = root :: mozilla :: LinkedListElement_Traits ; pub type LinkedListElement_ClientType = root :: mozilla :: LinkedListElement_Traits ; pub type LinkedListElement_ConstClientType = root :: mozilla :: LinkedListElement_Traits ; pub const LinkedListElement_NodeKind_Sentinel : root :: mozilla :: LinkedListElement_NodeKind = LinkedListElement_NodeKind :: Normal ; # [ repr ( i32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum LinkedListElement_NodeKind { Normal = 0 , } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct MallocAllocPolicy { pub _address : u8 , } # [ test ] fn bindgen_test_layout_MallocAllocPolicy ( ) { assert_eq ! ( :: std :: mem :: size_of :: < MallocAllocPolicy > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( MallocAllocPolicy ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < MallocAllocPolicy > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( MallocAllocPolicy ) ) ) ; } impl Clone for MallocAllocPolicy { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct TimeStamp63Bit { pub _bitfield_1 : root :: __BindgenBitfieldUnit < [ u8 ; 8usize ] , u64 > , pub __bindgen_align : [ u64 ; 0usize ] , } # [ test ] fn bindgen_test_layout_TimeStamp63Bit ( ) { assert_eq ! ( :: std :: mem :: size_of :: < TimeStamp63Bit > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( TimeStamp63Bit ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < TimeStamp63Bit > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( TimeStamp63Bit ) ) ) ; } impl Clone for TimeStamp63Bit { fn clone ( & self ) -> Self { * self } } impl TimeStamp63Bit { # [ inline ] pub fn mUsedCanonicalNow ( & self ) -> u64 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u64 ) } } # [ inline ] pub fn set_mUsedCanonicalNow ( & mut self , val : u64 ) { unsafe { let val : u64 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn mTimeStamp ( & self ) -> u64 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 63u8 ) as u64 ) } } # [ inline ] pub fn set_mTimeStamp ( & mut self , val : u64 ) { unsafe { let val : u64 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 63u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( mUsedCanonicalNow : u64 , mTimeStamp : u64 ) -> root :: __BindgenBitfieldUnit < [ u8 ; 8usize ] , u64 > { let mut __bindgen_bitfield_unit : root :: __BindgenBitfieldUnit < [ u8 ; 8usize ] , u64 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let mUsedCanonicalNow : u64 = unsafe { :: std :: mem :: transmute ( mUsedCanonicalNow ) } ; mUsedCanonicalNow as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 63u8 , { let mTimeStamp : u64 = unsafe { :: std :: mem :: transmute ( mTimeStamp ) } ; mTimeStamp as u64 } ) ; __bindgen_bitfield_unit } } pub type TimeStampValue = root :: mozilla :: TimeStamp63Bit ; # [ doc = " Instances of this class represent moments in time, or a special" ] # [ doc = " "null" moment. We do not use the non-monotonic system clock or" ] # [ doc = " local time, since they can be reset, causing apparent backward" ] # [ doc = " travel in time, which can confuse algorithms. Instead we measure" ] # [ doc = " elapsed time according to the system. This time can never go" ] # [ doc = " backwards (i.e. it never wraps around, at least not in less than" ] # [ doc = " five million years of system elapsed time). It might not advance" ] # [ doc = " while the system is sleeping. If TimeStamp::SetNow() is not called" ] # [ doc = " at all for hours or days, we might not notice the passage of some" ] # [ doc = " of that time." ] # [ doc = "" ] # [ doc = " We deliberately do not expose a way to convert TimeStamps to some" ] # [ doc = " particular unit. All you can do is compute a difference between two" ] # [ doc = " TimeStamps to get a TimeDuration. You can also add a TimeDuration" ] # [ doc = " to a TimeStamp to get a new TimeStamp. You can't do something" ] # [ doc = " meaningless like add two TimeStamps." ] # [ doc = "" ] # [ doc = " Internally this is implemented as either a wrapper around" ] # [ doc = " - high-resolution, monotonic, system clocks if they exist on this" ] # [ doc = " platform" ] # [ doc = " - PRIntervalTime otherwise. We detect wraparounds of" ] # [ doc = " PRIntervalTime and work around them." ] # [ doc = "" ] # [ doc = " This class is similar to C++11's time_point, however it is" ] # [ doc = " explicitly nullable and provides an IsNull() method. time_point" ] # [ doc = " is initialized to the clock's epoch and provides a" ] # [ doc = " time_since_epoch() method that functions similiarly. i.e." ] # [ doc = " t.IsNull() is equivalent to t.time_since_epoch() ==" ] # [ doc = " decltype(t)::duration::zero();" ] # [ doc = "" ] # [ doc = " Note that, since TimeStamp objects are small, prefer to pass them by value" ] # [ doc = " unless there is a specific reason not to do so." ] # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct TimeStamp { # [ doc = " When built with PRIntervalTime, a value of 0 means this instance" ] # [ doc = " is "null". Otherwise, the low 32 bits represent a PRIntervalTime," ] # [ doc = " and the high 32 bits represent a counter of the number of" ] # [ doc = " rollovers of PRIntervalTime that we've seen. This counter starts" ] # [ doc = " at 1 to avoid a real time colliding with the "null" value." ] # [ doc = "" ] # [ doc = " PR_INTERVAL_MAX is set at 100,000 ticks per second. So the minimum" ] # [ doc = " time to wrap around is about 2^64/100000 seconds, i.e. about" ] # [ doc = " 5,849,424 years." ] # [ doc = "" ] # [ doc = " When using a system clock, a value is system dependent." ] pub mValue : root :: mozilla :: TimeStampValue , } # [ test ] fn bindgen_test_layout_TimeStamp ( ) { assert_eq ! ( :: std :: mem :: size_of :: < TimeStamp > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( TimeStamp ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < TimeStamp > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( TimeStamp ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < TimeStamp > ( ) ) ) . mValue as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( TimeStamp ) , "::" , stringify ! ( mValue ) ) ) ; } extern "C" { # [ link_name = "\u{1}_ZN7mozilla9TimeStamp18GetFuzzyfoxEnabledEv" ] pub fn TimeStamp_GetFuzzyfoxEnabled ( ) -> bool ; } extern "C" { # [ link_name = "\u{1}_ZN7mozilla9TimeStamp18SetFuzzyfoxEnabledEb" ] pub fn TimeStamp_SetFuzzyfoxEnabled ( aValue : bool ) ; } extern "C" { # [ link_name = "\u{1}ZN7mozilla9TimeStamp12NowFuzzyTimeEv" ] pub fn TimeStamp_NowFuzzyTime ( ) -> i64 ; } extern "C" { # [ doc = " Return a timestamp representing the time when the current process was" ] # [ doc = " created which will be comparable with other timestamps taken with this" ] # [ doc = " class. If the actual process creation time is detected to be inconsistent" ] # [ doc = " the @a aIsInconsistent parameter will be set to true, the returned" ] # [ doc = " timestamp however will still be valid though inaccurate." ] # [ doc = "" ] # [ doc = " @param aIsInconsistent If non-null, set to true if an inconsistency was" ] # [ doc = " detected in the process creation time" ] # [ doc = " @returns A timestamp representing the time when the process was created," ] # [ doc = " this timestamp is always valid even when errors are reported" ] # [ link_name = "\u{1}ZN7mozilla9TimeStamp15ProcessCreationEPb" ] pub fn TimeStamp_ProcessCreation ( aIsInconsistent : * mut bool ) -> root :: mozilla :: TimeStamp ; } extern "C" { # [ doc = " Records a process restart. After this call ProcessCreation() will return" ] # [ doc = " the time when the browser was restarted instead of the actual time when" ] # [ doc = " the process was created." ] # [ link_name = "\u{1}ZN7mozilla9TimeStamp20RecordProcessRestartEv" ] pub fn TimeStamp_RecordProcessRestart ( ) ; } extern "C" { # [ link_name = "\u{1}ZN7mozilla9TimeStamp7StartupEv" ] pub fn TimeStamp_Startup ( ) ; } extern "C" { # [ link_name = "\u{1}ZN7mozilla9TimeStamp8ShutdownEv" ] pub fn TimeStamp_Shutdown ( ) ; } impl Clone for TimeStamp { fn clone ( & self ) -> Self { * self } } impl TimeStamp { # [ inline ] pub unsafe fn GetFuzzyfoxEnabled ( ) -> bool { TimeStamp_GetFuzzyfoxEnabled ( ) } # [ inline ] pub unsafe fn SetFuzzyfoxEnabled ( aValue : bool ) { TimeStamp_SetFuzzyfoxEnabled ( aValue ) } # [ inline ] pub unsafe fn NowFuzzyTime ( ) -> i64 { TimeStamp_NowFuzzyTime ( ) } # [ inline ] pub unsafe fn ProcessCreation ( aIsInconsistent : * mut bool ) -> root :: mozilla :: TimeStamp { TimeStamp_ProcessCreation ( aIsInconsistent ) } # [ inline ] pub unsafe fn RecordProcessRestart ( ) { TimeStamp_RecordProcessRestart ( ) } # [ inline ] pub unsafe fn Startup ( ) { TimeStamp_Startup ( ) } # [ inline ] pub unsafe fn Shutdown ( ) { TimeStamp_Shutdown ( ) } } pub type Vector_Impl = u8 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct Vector_CapacityAndReserved { pub mCapacity : usize , pub mReserved : usize , } pub type Vector_ElementType < T > = T ; pub const Vector_InlineLength : root :: mozilla :: Vector__bindgen_ty_1 = Vector__bindgen_ty_1 :: InlineLength ; # [ repr ( i32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum Vector__bindgen_ty_1 { InlineLength = 0 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct Vector_Range < T > { pub mCur : * mut T , pub mEnd : * mut T , pub phantom_0 : :: std :: marker :: PhantomData < :: std :: cell :: UnsafeCell < T > > , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct Vector_ConstRange < T > { pub mCur : * const T , pub mEnd : * const T , pub phantom_0 : :: std :: marker :: PhantomData < :: std :: cell :: UnsafeCell < T > > , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BufferList { pub address : u8 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BufferList_Segment { pub mData : * mut :: std :: os :: raw :: c_char , pub mSize : usize , pub mCapacity : usize , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct BufferList_IterImpl { pub mSegment : usize , pub mData : * mut :: std :: os :: raw :: c_char , pub mDataEnd : * mut :: std :: os :: raw :: c_char , } } pub mod JS { # [ allow ( unused_imports ) ] use self :: super :: super :: root ; pub type Latin1Char = :: std :: os :: raw :: c_uchar ; # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Symbol { unused : [ u8 ; 0 ] , } impl Clone for Symbol { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct BigInt { unused : [ u8 ; 0 ] , } impl Clone for BigInt { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Compartment { unused : [ u8 ; 0 ] , } impl Clone for Compartment { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Realm { unused : [ u8 ; 0 ] , } impl Clone for Realm { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Zone { unused : [ u8 ; 0 ] , } impl Clone for Zone { fn clone ( & self ) -> Self { * self } } pub type HandleFunction = root :: JS :: Handle < * mut root :: JSFunction > ; pub type HandleId = root :: JS :: Handle < root :: JS :: PropertyKey > ; pub type HandleObject = root :: JS :: Handle < * mut root :: JSObject > ; pub type HandleString = root :: JS :: Handle < * mut root :: JSString > ; pub type HandleValue = root :: JS :: Handle < root :: JS :: Value > ; pub type HandleObjectVector = u8 ; pub type MutableHandleObject = root :: JS :: MutableHandle < * mut root :: JSObject > ; pub type MutableHandleString = root :: JS :: MutableHandle < * mut root :: JSString > ; pub type MutableHandleValue = root :: JS :: MutableHandle < root :: JS :: Value > ; pub type RootedObject = root :: JS :: Rooted < * mut root :: JSObject > ; pub type RootedValue = root :: JS :: Rooted < root :: JS :: Value > ; pub type PersistentRootedIdVector = root :: JS :: PersistentRootedVector ; pub type PersistentRootedObjectVector = root :: JS :: PersistentRootedVector ; # [ repr ( i32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum TraceKind { Object = 0 , String = 2 , Symbol = 3 , Script = 1 , Shape = 4 , ObjectGroup = 5 , Null = 6 , BaseShape = 15 , JitCode = 31 , LazyScript = 47 , Scope = 63 , RegExpShared = 79 , BigInt = 95 , } # [ repr ( i8 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum RootKind { BaseShape = 0 , JitCode = 1 , LazyScript = 2 , Scope = 3 , Object = 4 , ObjectGroup = 5 , Script = 6 , Shape = 7 , String = 8 , Symbol = 9 , BigInt = 10 , RegExpShared = 11 , Id = 12 , Value = 13 , Traceable = 14 , Limit = 15 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct DeletePolicy { pub address : u8 , } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct FreePolicy { pub address : u8 , } # [ test ] fn bindgen_test_layout_FreePolicy ( ) { assert_eq ! ( :: std :: mem :: size_of :: < FreePolicy > ( ) , 1usize , concat ! ( "Size of: " , stringify ! ( FreePolicy ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < FreePolicy > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( FreePolicy ) ) ) ; } impl Clone for FreePolicy { fn clone ( & self ) -> Self { * self } } pub type UniqueChars = u64 ; pub mod shadow { # [ allow ( unused_imports ) ] use self :: super :: super :: super :: root ; # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Zone { pub runtime : * mut root :: JSRuntime , pub barrierTracer : * mut root :: JSTracer , pub needsIncrementalBarrier : u32 , pub gcState : root :: JS :: shadow :: Zone_GCState , } # [ repr ( u8 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum Zone_GCState { NoGC = 0 , MarkBlackOnly = 1 , MarkBlackAndGray = 2 , Sweep = 3 , Finished = 4 , Compact = 5 , } # [ test ] fn bindgen_test_layout_Zone ( ) { assert_eq ! ( :: std :: mem :: size_of :: < Zone > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( Zone ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < Zone > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Zone ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Zone > ( ) ) ) . runtime as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Zone ) , "::" , stringify ! ( runtime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Zone > ( ) ) ) . barrierTracer as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( Zone ) , "::" , stringify ! ( barrierTracer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Zone > ( ) ) ) . needsIncrementalBarrier as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( Zone ) , "::" , stringify ! ( needsIncrementalBarrier ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Zone > ( ) ) ) . gcState as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( Zone ) , "::" , stringify ! ( gcState ) ) ) ; } impl Clone for Zone { fn clone ( & self ) -> Self { * self } } # [ repr ( C ) ] # [ derive ( Debug , Copy ) ] pub struct Realm { pub compartment : * mut root :: JS :: Compartment , } # [ test ] fn bindgen_test_layout_Realm ( ) { assert_eq ! ( :: std :: mem :: size_of :: < Realm > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( Realm ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < Realm > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( Realm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < Realm > ( ) ) ) . compartment as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( Realm ) , "::" , stringify ! ( compartment ) ) ) ; } impl Clone for Realm { fn clone ( & self ) -> Self { * self } } } extern "C" { # [ doc = " Returns a static string equivalent of |kind|." ] # [ link_name = "\u{1}_ZN2JS18GCTraceKindToAsciiENS_9TraceKindE" ] pub fn GCTraceKindToAscii ( kind : root :: JS :: TraceKind ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ link_name = "\u{1}_ZN2JS24InitRealmStandardClassesEP9JSContext" ] pub fn InitRealmStandardClasses ( cx : * mut root :: JSContext ) -> bool ; } extern "C" { # [ link_name = "\u{1}_ZN2JS23GetRealmObjectPrototypeEP9JSContext" ] pub fn GetRealmObjectPrototype ( cx : * mut root :: JSContext ) -> * mut root :: JSObject ; }

Flags: needinfo?(pbone)
Flags: needinfo?(pbone)
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d54a1deb34e9
Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
https://hg.mozilla.org/integration/autoland/rev/01c1f397f47d
Remove nursery size parameter from GCRuntime::init r=jonco
Flags: needinfo?(jcoppeard)
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.