From 20411d4b85080fb063009b5a7c7783e55b020a32 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Sun, 21 May 2017 01:12:22 -0500 Subject: [PATCH 01/35] servo: Merge #16971 - Rewrite parallel.rs (from bholley:fix_parallelism); r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1366347 Source-Repo: https://github.com/servo/servo Source-Revision: f14eeb00c0d9c76ead36d9caecafb218598525b1 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : d78c7f90576fa45fb949e9424d57c6aa7906f980 --- servo/components/layout/parallel.rs | 7 +- servo/components/style/parallel.rs | 184 ++++++++++++++++++++++------ 2 files changed, 155 insertions(+), 36 deletions(-) diff --git a/servo/components/layout/parallel.rs b/servo/components/layout/parallel.rs index 6128abbdae65..ada231b81196 100644 --- a/servo/components/layout/parallel.rs +++ b/servo/components/layout/parallel.rs @@ -17,12 +17,17 @@ use servo_config::opts; use std::mem; use std::sync::atomic::{AtomicIsize, Ordering}; use style::dom::UnsafeNode; -use style::parallel::CHUNK_SIZE; use traversal::{AssignISizes, BubbleISizes}; use traversal::AssignBSizes; pub use style::parallel::traverse_dom; +/// Traversal chunk size. +/// +/// FIXME(bholley): This is all likely very inefficient and should probably be +/// reworked to mirror the style system's parallel.rs. +pub const CHUNK_SIZE: usize = 64; + #[allow(dead_code)] fn static_assertion(node: UnsafeNode) { unsafe { diff --git a/servo/components/style/parallel.rs b/servo/components/style/parallel.rs index 6495f41ee694..859548d3c8b8 100644 --- a/servo/components/style/parallel.rs +++ b/servo/components/style/parallel.rs @@ -26,16 +26,38 @@ use context::TraversalStatistics; use dom::{OpaqueNode, SendNode, TElement, TNode}; use rayon; use scoped_tls::ScopedTLS; +use sharing::STYLE_SHARING_CANDIDATE_CACHE_SIZE; +use smallvec::SmallVec; use std::borrow::Borrow; +use std::mem; use time; use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken}; -/// The chunk size used to split the parallel traversal nodes. +/// The maximum number of child nodes that we will process as a single unit. /// -/// We send each `CHUNK_SIZE` nodes as a different work unit to the work queue. -pub const CHUNK_SIZE: usize = 64; +/// Larger values will increase style sharing cache hits and general DOM locality +/// at the expense of decreased opportunities for parallelism. The style sharing +/// cache can hold 8 entries, but not all styles are shareable, so we set this +/// value to 16. These values have not been measured and could potentially be +/// tuned. +pub const WORK_UNIT_MAX: usize = 16; -/// A parallel top down traversal, generic over `D`. +/// Verify that the style sharing cache size doesn't change. If it does, we should +/// reconsider the above. We do this, rather than defining WORK_UNIT_MAX in terms +/// of STYLE_SHARING_CANDIDATE_CACHE_SIZE, so that altering the latter doesn't +/// have surprising effects on the parallelism characteristics of the style system. +#[allow(dead_code)] +fn static_assert() { + unsafe { mem::transmute::<_, [u32; STYLE_SHARING_CANDIDATE_CACHE_SIZE]>([1; 8]); } +} + +/// A list of node pointers. +/// +/// Note that the inline storage doesn't need to be sized to WORK_UNIT_MAX, but +/// it generally seems sensible to do so. +type NodeList = SmallVec<[SendNode; WORK_UNIT_MAX]>; + +/// Entry point for the parallel traversal. #[allow(unsafe_code)] pub fn traverse_dom(traversal: &D, root: E, @@ -46,24 +68,29 @@ pub fn traverse_dom(traversal: &D, { let dump_stats = traversal.shared_context().options.dump_style_statistics; let start_time = if dump_stats { Some(time::precise_time_s()) } else { None }; + let mut nodes = NodeList::::new(); debug_assert!(traversal.is_parallel()); // Handle Gecko's eager initial styling. We don't currently support it // in conjunction with bottom-up traversal. If we did, we'd need to put // it on the context to make it available to the bottom-up phase. - let (nodes, depth) = if token.traverse_unstyled_children_only() { + let depth = if token.traverse_unstyled_children_only() { debug_assert!(!D::needs_postorder_traversal()); - let mut children = vec![]; for kid in root.as_node().children() { if kid.as_element().map_or(false, |el| el.get_data().is_none()) { - children.push(unsafe { SendNode::new(kid) }); + nodes.push(unsafe { SendNode::new(kid) }); } } - (children, root.depth() + 1) + root.depth() + 1 } else { - (vec![unsafe { SendNode::new(root.as_node()) }], root.depth()) + nodes.push(unsafe { SendNode::new(root.as_node()) }); + root.depth() }; + if nodes.is_empty() { + return; + } + let traversal_data = PerLevelTraversalData { current_dom_depth: depth, }; @@ -72,7 +99,13 @@ pub fn traverse_dom(traversal: &D, queue.install(|| { rayon::scope(|scope| { - traverse_nodes(nodes, root, traversal_data, scope, traversal, &tls); + traverse_nodes(nodes, + DispatchMode::TailCall, + root, + traversal_data, + scope, + traversal, + &tls); }); }); @@ -93,6 +126,17 @@ pub fn traverse_dom(traversal: &D, } /// A parallel top-down DOM traversal. +/// +/// This algorithm traverses the DOM in a breadth-first, top-down manner. The +/// goals are: +/// * Never process a child before its parent (since child style depends on +/// parent style). If this were to happen, the styling algorithm would panic. +/// * Prioritize discovering nodes as quickly as possible to maximize +/// opportunities for parallelism. +/// * Style all the children of a given node (i.e. all sibling nodes) on +/// a single thread (with an upper bound to handle nodes with an +/// abnormally large number of children). This is important because we use +/// a thread-local cache to share styles between siblings. #[inline(always)] #[allow(unsafe_code)] fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode], @@ -104,17 +148,42 @@ fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode], where E: TElement + 'scope, D: DomTraversal, { - let mut discovered_child_nodes = vec![]; + debug_assert!(nodes.len() <= WORK_UNIT_MAX); + let mut discovered_child_nodes = NodeList::::new(); { // Scope the borrow of the TLS so that the borrow is dropped before - // potentially traversing a child on this thread. + // a potential recursive call when we pass TailCall. let mut tlc = tls.ensure(|| traversal.create_thread_local_context()); for n in nodes { - // Perform the appropriate traversal. + // If the last node we processed produced children, spawn them off + // into a work item. We do this at the beginning of the loop (rather + // than at the end) so that we can traverse the children of the last + // sibling directly on this thread without a spawn call. + // + // This has the important effect of removing the allocation and + // context-switching overhead of the parallel traversal for perfectly + // linear regions of the DOM, i.e.: + // + // + // + // Which are not at all uncommon. + if !discovered_child_nodes.is_empty() { + let children = mem::replace(&mut discovered_child_nodes, Default::default()); + let mut traversal_data_copy = traversal_data.clone(); + traversal_data_copy.current_dom_depth += 1; + traverse_nodes(children, + DispatchMode::NotTailCall, + root, + traversal_data_copy, + scope, + traversal, + tls); + } + let node = **n; let mut children_to_process = 0isize; - traversal.process_preorder(&mut traversal_data, &mut *tlc, node); + traversal.process_preorder(&traversal_data, &mut *tlc, node); if let Some(el) = node.as_element() { traversal.traverse_children(&mut *tlc, el, |_tlc, kid| { children_to_process += 1; @@ -127,11 +196,37 @@ fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode], } } - traversal_data.current_dom_depth += 1; - traverse_nodes(discovered_child_nodes, root, traversal_data, scope, traversal, tls); + // Handle the children of the last element in this work unit. If any exist, + // we can process them (or at least one work unit's worth of them) directly + // on this thread by passing TailCall. + if !discovered_child_nodes.is_empty() { + traversal_data.current_dom_depth += 1; + traverse_nodes(discovered_child_nodes, + DispatchMode::TailCall, + root, + traversal_data, + scope, + traversal, + tls); + } } -fn traverse_nodes<'a, 'scope, E, D>(nodes: Vec>, root: OpaqueNode, +/// Controls whether traverse_nodes may make a recursive call to continue +/// doing work, or whether it should always dispatch work asynchronously. +#[derive(Clone, Copy, PartialEq)] +enum DispatchMode { + TailCall, + NotTailCall, +} + +impl DispatchMode { + fn is_tail_call(&self) -> bool { matches!(*self, DispatchMode::TailCall) } +} + +#[inline] +fn traverse_nodes<'a, 'scope, E, D>(nodes: NodeList, + mode: DispatchMode, + root: OpaqueNode, traversal_data: PerLevelTraversalData, scope: &'a rayon::Scope<'scope>, traversal: &'scope D, @@ -139,25 +234,44 @@ fn traverse_nodes<'a, 'scope, E, D>(nodes: Vec>, root: where E: TElement + 'scope, D: DomTraversal, { - if nodes.is_empty() { - return; - } + debug_assert!(!nodes.is_empty()); - // Optimization: traverse directly and avoid a heap-allocating spawn() call if - // we're only pushing one work unit. - if nodes.len() <= CHUNK_SIZE { - let nodes = nodes.into_boxed_slice(); - top_down_dom(&nodes, root, traversal_data, scope, traversal, tls); - return; - } + // In the common case, our children fit within a single work unit, in which + // case we can pass the SmallVec directly and avoid extra allocation. + if nodes.len() <= WORK_UNIT_MAX { + if mode.is_tail_call() { + // If this is a tail call, bypass rayon and invoke top_down_dom directly. + top_down_dom(&nodes, root, traversal_data, scope, traversal, tls); + } else { + // The caller isn't done yet. Append to the queue and return synchronously. + scope.spawn(move |scope| { + let nodes = nodes; + top_down_dom(&nodes, root, traversal_data, scope, traversal, tls); + }); + } + } else { + // FIXME(bholley): This should be an ArrayVec. + let mut first_chunk: Option> = None; + for chunk in nodes.chunks(WORK_UNIT_MAX) { + if mode.is_tail_call() && first_chunk.is_none() { + first_chunk = Some(chunk.iter().cloned().collect::>()); + } else { + let boxed = chunk.iter().cloned().collect::>().into_boxed_slice(); + let traversal_data_copy = traversal_data.clone(); + scope.spawn(move |scope| { + let b = boxed; + top_down_dom(&*b, root, traversal_data_copy, scope, traversal, tls) + }); - // General case. - for chunk in nodes.chunks(CHUNK_SIZE) { - let nodes = chunk.iter().cloned().collect::>().into_boxed_slice(); - let traversal_data = traversal_data.clone(); - scope.spawn(move |scope| { - let nodes = nodes; - top_down_dom(&nodes, root, traversal_data, scope, traversal, tls) - }) + } + } + + // If this is a tail call, bypass rayon for the first chunk and invoke top_down_dom + // directly. + debug_assert_eq!(first_chunk.is_some(), mode.is_tail_call()); + if let Some(c) = first_chunk { + debug_assert_eq!(c.len(), WORK_UNIT_MAX); + top_down_dom(&*c, root, traversal_data, scope, traversal, tls); + } } } From 414c4267afb64e4520d3c78bc15299c8a6f754fc Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 21 May 2017 03:07:47 -0500 Subject: [PATCH 02/35] servo: Merge #16945 - Update css animations by css rule changes (from hiikezoe:update-css-animations-by-css-rule-changes); r=birtles,heycam This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1364799 - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because it's for stylo Source-Repo: https://github.com/servo/servo Source-Revision: 255387a915ef83db6b11d976f89c10b518c97487 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 627244efb8039b400be3f2a1dc31acf3d8089f25 --- .../style/gecko/generated/structs_debug.rs | 1857 ++++++------- .../style/gecko/generated/structs_release.rs | 2391 ++++++++--------- servo/components/style/matching.rs | 8 +- servo/components/style/traversal.rs | 9 + servo/ports/geckolib/glue.rs | 7 +- 5 files changed, 1996 insertions(+), 2276 deletions(-) diff --git a/servo/components/style/gecko/generated/structs_debug.rs b/servo/components/style/gecko/generated/structs_debug.rs index ffa6dc5b55a2..b8bd2ca8e5d9 100644 --- a/servo/components/style/gecko/generated/structs_debug.rs +++ b/servo/components/style/gecko/generated/structs_debug.rs @@ -971,7 +971,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1170,16 +1169,6 @@ pub mod root { use self::super::super::root; #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct __is_swappable { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __is_nothrow_swappable { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct pair<_T1, _T2> { pub first: _T1, pub second: _T2, @@ -1188,8 +1177,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__PCCP = u8; - pub type pair__PCCFP = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1219,17 +1206,10 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __iterator_traits { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1299,9 +1279,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = - root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1391,9 +1370,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -5140,7 +5119,7 @@ pub mod root { pub mDataset: *mut root::nsDOMStringMap, /** * SMIL Overridde style rules (for SMIL animation of CSS properties) - * @see Element::GetSMILOverrideStyle + * @see nsIContent::GetSMILOverrideStyle */ pub mSMILOverrideStyle: root::nsCOMPtr, /** @@ -6470,6 +6449,7 @@ pub mod root { Normal = 0, ForReconstruct = 1, ForAnimationOnly = 2, + ForCSSRuleChanges = 3, } pub const UpdateAnimationsTasks_CSSAnimations: root::mozilla::UpdateAnimationsTasks = @@ -9257,8 +9237,6 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_instantiation_3() { assert_eq!(::std::mem::size_of::() , @@ -12968,11 +12946,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -13134,113 +13107,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { - let bitfield_unit_val = - { - let bitfield_unit_val = { 0 }; - let isMuted = isMuted as u8 as u8; - let mask = 1usize as u8; - let isMuted = (isMuted << 0usize) & mask; - bitfield_unit_val | isMuted - }; - let ownsLinebuf_ = ownsLinebuf_ as u8 as u8; - let mask = 2usize as u8; - let ownsLinebuf_ = (ownsLinebuf_ << 1usize) & mask; - bitfield_unit_val | ownsLinebuf_ - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -14060,7 +13926,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -14165,7 +14031,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -14275,7 +14141,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -16745,7 +16611,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray>, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -21643,7 +21509,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /** * Cache of Attrs. */ @@ -22909,57 +22775,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_82 { + pub enum _bindgen_ty_84 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -28132,7 +27998,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -29364,7 +29230,7 @@ pub mod root { pub _mOwningThread: root::nsAutoOwningThread, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -29391,8 +29257,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -30887,7 +30753,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_85() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_87() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30898,7 +30764,7 @@ pub mod root { root::mozilla::StaticRefPtr ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_86() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_88() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33043,7 +32909,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray; + root::nsTArray>; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -33410,48 +33276,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_84 + root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_86 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = - _bindgen_ty_84::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_84 { + pub enum _bindgen_ty_86 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -34182,22 +34048,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct _bindgen_ty_29 { - pub _address: u8, - } - impl Clone for _bindgen_ty_29 { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct _bindgen_ty_30 { - pub _address: u8, - } - impl Clone for _bindgen_ty_30 { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, @@ -34236,7 +34086,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_87() { + fn __bindgen_test_layout_IntegralConstant_instantiation_89() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34245,7 +34095,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_88() { + fn __bindgen_test_layout_IntegralConstant_instantiation_90() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34254,7 +34104,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_89() { + fn __bindgen_test_layout_nsCharTraits_instantiation_91() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34265,33 +34115,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_90() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsReadingIterator_instantiation_92() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsReadingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_91() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsWritingIterator_instantiation_93() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsWritingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_92() { + fn __bindgen_test_layout_nsCharTraits_instantiation_94() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34302,33 +34148,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_93() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_95() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_94() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_96() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_95() { + fn __bindgen_test_layout_nsCharTraits_instantiation_97() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34339,7 +34181,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_96() { + fn __bindgen_test_layout_nsCharTraits_instantiation_98() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34350,7 +34192,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_187141_instantiation_97() { + fn __bindgen_test_layout__bindgen_ty_id_210589_instantiation_99() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34359,7 +34201,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_187177_instantiation_98() { + fn __bindgen_test_layout__bindgen_ty_id_210625_instantiation_100() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34368,7 +34210,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_99() { + fn __bindgen_test_layout_nsTArray_instantiation_101() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34379,7 +34221,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_100() { + fn __bindgen_test_layout_Handle_instantiation_102() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34390,7 +34232,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_101() { + fn __bindgen_test_layout_Handle_instantiation_103() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34401,7 +34243,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_102() { + fn __bindgen_test_layout_MutableHandle_instantiation_104() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34412,7 +34254,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_103() { + fn __bindgen_test_layout_Rooted_instantiation_105() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34423,7 +34265,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_104() { + fn __bindgen_test_layout_DeletePolicy_instantiation_106() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34434,7 +34276,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_105() { + fn __bindgen_test_layout_nsTArray_instantiation_107() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34445,7 +34287,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_106() { + fn __bindgen_test_layout_nsTArray_instantiation_108() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34456,29 +34298,29 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_107() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_108() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] fn __bindgen_test_layout_nsTArray_instantiation_109() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_110() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_111() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34489,7 +34331,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_110() { + fn __bindgen_test_layout_TErrorResult_instantiation_112() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34500,7 +34342,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_111() { + fn __bindgen_test_layout_TErrorResult_instantiation_113() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34511,7 +34353,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_112() { + fn __bindgen_test_layout_already_AddRefed_instantiation_114() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34522,28 +34364,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_113() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_114() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_115() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -34555,7 +34375,18 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_116() { + fn __bindgen_test_layout_MutableHandle_instantiation_116() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_117() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34566,17 +34397,6 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_117() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_118() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -34588,7 +34408,18 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_119() { + fn __bindgen_test_layout_RefPtr_instantiation_119() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_120() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34599,29 +34430,40 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_120() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_Handle_instantiation_121() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_121() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::Handle<*mut root::JSObject> ) )); } #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_122() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_123() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_124() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34632,7 +34474,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_123() { + fn __bindgen_test_layout_Handle_instantiation_125() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34643,7 +34485,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_124() { + fn __bindgen_test_layout_MutableHandle_instantiation_126() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34654,7 +34496,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_125() { + fn __bindgen_test_layout_MutableHandle_instantiation_127() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34665,28 +34507,6 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_126() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_127() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] fn __bindgen_test_layout_DeletePolicy_instantiation_128() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( @@ -34699,14 +34519,14 @@ pub mod root { } #[test] fn __bindgen_test_layout_UniquePtr_instantiation_129() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); + root::mozilla::UniquePtr ) )); } #[test] fn __bindgen_test_layout_DeletePolicy_instantiation_130() { @@ -34721,14 +34541,14 @@ pub mod root { } #[test] fn __bindgen_test_layout_UniquePtr_instantiation_131() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); + root::mozilla::UniquePtr ) )); } #[test] fn __bindgen_test_layout_DeletePolicy_instantiation_132() { @@ -34775,18 +34595,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_136() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::std::iterator ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::std::iterator ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_137() { + fn __bindgen_test_layout_DeletePolicy_instantiation_136() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34797,7 +34606,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_138() { + fn __bindgen_test_layout_UniquePtr_instantiation_137() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34808,6 +34617,17 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] + fn __bindgen_test_layout_iterator_instantiation_138() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::std::iterator ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::std::iterator ) )); + } + #[test] fn __bindgen_test_layout_DeletePolicy_instantiation_139() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( @@ -34830,7 +34650,29 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_141() { + fn __bindgen_test_layout_DeletePolicy_instantiation_141() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_142() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_143() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34841,7 +34683,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_142() { + fn __bindgen_test_layout_Handle_instantiation_144() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34852,7 +34694,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_143() { + fn __bindgen_test_layout_MutableHandle_instantiation_145() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34863,7 +34705,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_144() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_146() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34874,7 +34716,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_145() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_147() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34885,7 +34727,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_146() { + fn __bindgen_test_layout_nsTArray_instantiation_148() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34896,7 +34738,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_147() { + fn __bindgen_test_layout_nsTArray_instantiation_149() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34907,7 +34749,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_148() { + fn __bindgen_test_layout_Heap_instantiation_150() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34918,7 +34760,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_149() { + fn __bindgen_test_layout_Heap_instantiation_151() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34929,7 +34771,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_150() { + fn __bindgen_test_layout_TenuredHeap_instantiation_152() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34940,7 +34782,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_151() { + fn __bindgen_test_layout_already_AddRefed_instantiation_153() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34951,7 +34793,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_152() { + fn __bindgen_test_layout_nsTArray_instantiation_154() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34964,29 +34806,29 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_153() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_154() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] fn __bindgen_test_layout_RefPtr_instantiation_155() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_156() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_157() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34997,7 +34839,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_156() { + fn __bindgen_test_layout_nsTArray_instantiation_158() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35010,28 +34852,6 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_157() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_158() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) )); - } - #[test] fn __bindgen_test_layout_nsCOMPtr_instantiation_159() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35043,7 +34863,29 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_160() { + fn __bindgen_test_layout_nsTArray_instantiation_160() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_161() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_162() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35054,7 +34896,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_161() { + fn __bindgen_test_layout_already_AddRefed_instantiation_163() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35065,7 +34907,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_162() { + fn __bindgen_test_layout_RefPtr_instantiation_164() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35076,7 +34918,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_163() { + fn __bindgen_test_layout_already_AddRefed_instantiation_165() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35087,7 +34929,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_164() { + fn __bindgen_test_layout_MutableHandle_instantiation_166() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35098,29 +34940,29 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_165() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_166() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_167() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_168() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_169() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35131,7 +34973,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_168() { + fn __bindgen_test_layout_RefPtr_instantiation_170() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35142,7 +34984,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_169() { + fn __bindgen_test_layout_nsTArray_instantiation_171() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35155,7 +34997,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_170() { + fn __bindgen_test_layout_Handle_instantiation_172() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35166,7 +35008,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_171() { + fn __bindgen_test_layout_already_AddRefed_instantiation_173() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35177,7 +35019,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_172() { + fn __bindgen_test_layout_already_AddRefed_instantiation_174() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35188,7 +35030,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_173() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_175() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35199,7 +35041,18 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_174() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_176() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_177() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35210,7 +35063,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_175() { + fn __bindgen_test_layout_DefaultDelete_instantiation_178() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35221,7 +35074,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_176() { + fn __bindgen_test_layout_UniquePtr_instantiation_179() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35232,7 +35085,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_177() { + fn __bindgen_test_layout_already_AddRefed_instantiation_180() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35243,7 +35096,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_178() { + fn __bindgen_test_layout_nsTArray_instantiation_181() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35254,7 +35107,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_179() { + fn __bindgen_test_layout_Handle_instantiation_182() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35265,7 +35118,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_180() { + fn __bindgen_test_layout_Handle_instantiation_183() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35276,41 +35129,6 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_181() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_182() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - } - #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_183() { - assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_184() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35322,7 +35140,42 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_185() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_185() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + } + #[test] + fn __bindgen_test_layout_nsDataHashtable_instantiation_186() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_187() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_188() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35333,7 +35186,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_186() { + fn __bindgen_test_layout_nsTArray_instantiation_189() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35344,7 +35197,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_187() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35355,7 +35208,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_188() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35366,7 +35219,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_189() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_192() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -35375,7 +35228,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_190() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35386,7 +35239,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_191() { + fn __bindgen_test_layout_nsTArray_instantiation_194() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35397,7 +35250,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_192() { + fn __bindgen_test_layout_DefaultDelete_instantiation_195() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35408,7 +35261,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_193() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_196() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35419,7 +35272,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_194() { + fn __bindgen_test_layout_RefPtr_instantiation_197() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35430,7 +35283,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_195() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_198() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35441,7 +35294,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_196() { + fn __bindgen_test_layout_nsTArray_instantiation_199() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35452,7 +35305,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_197() { + fn __bindgen_test_layout_already_AddRefed_instantiation_200() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35463,39 +35316,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_198() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_199() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_200() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_201() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35507,7 +35327,40 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_202() { + fn __bindgen_test_layout_already_AddRefed_instantiation_202() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_203() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_204() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_205() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35518,7 +35371,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_203() { + fn __bindgen_test_layout_Handle_instantiation_206() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35529,7 +35382,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_204() { + fn __bindgen_test_layout_Handle_instantiation_207() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35540,7 +35393,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_205() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_208() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35551,7 +35404,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_206() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35562,7 +35415,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_210() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35573,7 +35426,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_208() { + fn __bindgen_test_layout_Handle_instantiation_211() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35584,7 +35437,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209() { + fn __bindgen_test_layout_nsTArray_instantiation_212() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35595,7 +35448,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35606,7 +35459,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_211() { + fn __bindgen_test_layout_RefPtr_instantiation_214() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35617,7 +35470,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_212() { + fn __bindgen_test_layout_RefPtr_instantiation_215() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35628,7 +35481,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_WeakPtr_instantiation_213() { + fn __bindgen_test_layout_WeakPtr_instantiation_216() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -35637,7 +35490,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_214() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_217() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35648,7 +35501,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_215() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_218() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35659,7 +35512,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_216() { + fn __bindgen_test_layout_RefPtr_instantiation_219() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35670,7 +35523,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_217() { + fn __bindgen_test_layout_Handle_instantiation_220() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35681,7 +35534,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_218() { + fn __bindgen_test_layout_OwningNonNull_instantiation_221() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35692,7 +35545,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_219() { + fn __bindgen_test_layout_OwningNonNull_instantiation_222() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35703,7 +35556,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_220() { + fn __bindgen_test_layout_OwningNonNull_instantiation_223() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35714,7 +35567,7 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_221() { + fn __bindgen_test_layout_Handle_instantiation_224() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35725,7 +35578,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_222() { + fn __bindgen_test_layout_Handle_instantiation_225() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35736,7 +35589,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_223() { + fn __bindgen_test_layout_Handle_instantiation_226() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35747,7 +35600,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_224() { + fn __bindgen_test_layout_MutableHandle_instantiation_227() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35758,7 +35611,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_225() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_228() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35769,7 +35622,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_226() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_229() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35780,7 +35633,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_227() { + fn __bindgen_test_layout_PointTyped_instantiation_230() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35791,39 +35644,6 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_228() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_229() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_RectTyped_instantiation_230() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] fn __bindgen_test_layout_IntPointTyped_instantiation_231() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( @@ -35835,7 +35655,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_232() { + fn __bindgen_test_layout_SizeTyped_instantiation_232() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35846,7 +35666,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_233() { + fn __bindgen_test_layout_RectTyped_instantiation_233() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35857,26 +35677,26 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_234() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + fn __bindgen_test_layout_IntPointTyped_instantiation_234() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); + [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_235() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + fn __bindgen_test_layout_IntSizeTyped_instantiation_235() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); + [u32; 2usize] ) )); } #[test] fn __bindgen_test_layout_IntRectTyped_instantiation_236() { @@ -35890,7 +35710,40 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_237() { + fn __bindgen_test_layout_MarginTyped_instantiation_237() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_RectTyped_instantiation_238() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntRectTyped_instantiation_239() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactor_instantiation_240() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -35899,7 +35752,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_238() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_241() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35910,7 +35763,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_239() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_242() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35921,7 +35774,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_240() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_243() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35932,7 +35785,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_241() { + fn __bindgen_test_layout_already_AddRefed_instantiation_244() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35943,41 +35796,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_242() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_243() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray - ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_244() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_245() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35989,7 +35807,42 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_246() { + fn __bindgen_test_layout_nsTArray_instantiation_246() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray + ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_247() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_248() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_249() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36000,7 +35853,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_247() { + fn __bindgen_test_layout_MutableHandle_instantiation_250() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36011,7 +35864,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_248() { + fn __bindgen_test_layout_MutableHandle_instantiation_251() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36022,7 +35875,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_249() { + fn __bindgen_test_layout_already_AddRefed_instantiation_252() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36033,7 +35886,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_250() { + fn __bindgen_test_layout_DefaultDelete_instantiation_253() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36044,7 +35897,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_251() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_254() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36055,7 +35908,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_252() { + fn __bindgen_test_layout_Rooted_instantiation_255() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36066,7 +35919,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_253() { + fn __bindgen_test_layout_Rooted_instantiation_256() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36077,7 +35930,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_254() { + fn __bindgen_test_layout_already_AddRefed_instantiation_257() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36088,7 +35941,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_255() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_258() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36099,7 +35952,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_256() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_259() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36110,7 +35963,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_257() { + fn __bindgen_test_layout_nsTArray_instantiation_260() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36121,7 +35974,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_258() { + fn __bindgen_test_layout_Handle_instantiation_261() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36132,7 +35985,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_259() { + fn __bindgen_test_layout_MutableHandle_instantiation_262() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36143,39 +35996,6 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_260() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_261() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_262() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_263() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36187,26 +36007,26 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_264() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_MutableHandle_instantiation_264() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_265() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_265() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_266() { @@ -36220,7 +36040,40 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_267() { + fn __bindgen_test_layout_already_AddRefed_instantiation_267() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_268() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_269() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_270() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36231,43 +36084,6 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_268() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr - ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_269() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_270() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - } - #[test] fn __bindgen_test_layout_RefPtr_instantiation_271() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36281,7 +36097,44 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_272() { + fn __bindgen_test_layout_nsTArray_instantiation_272() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_273() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_274() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr + ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_275() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36292,7 +36145,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_273() { + fn __bindgen_test_layout_nsTArray_instantiation_276() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36303,7 +36156,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_274() { + fn __bindgen_test_layout_Handle_instantiation_277() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36314,7 +36167,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_275() { + fn __bindgen_test_layout_MutableHandle_instantiation_278() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36325,7 +36178,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_276() { + fn __bindgen_test_layout_Handle_instantiation_279() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36336,7 +36189,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_277() { + fn __bindgen_test_layout_MutableHandle_instantiation_280() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36347,7 +36200,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_278() { + fn __bindgen_test_layout_already_AddRefed_instantiation_281() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36358,7 +36211,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_279() { + fn __bindgen_test_layout_already_AddRefed_instantiation_282() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36369,7 +36222,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_280() { + fn __bindgen_test_layout_already_AddRefed_instantiation_283() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36380,7 +36233,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_281() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_284() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36391,7 +36244,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_282() { + fn __bindgen_test_layout_OwningNonNull_instantiation_285() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36404,7 +36257,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_283() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_286() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36415,7 +36268,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_284() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_287() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36426,7 +36279,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_285() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_288() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36437,7 +36290,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_286() { + fn __bindgen_test_layout_DefaultDelete_instantiation_289() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36448,7 +36301,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_287() { + fn __bindgen_test_layout_already_AddRefed_instantiation_290() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36459,7 +36312,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_288() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_291() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36470,39 +36323,6 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_289() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_290() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_291() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_292() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36515,6 +36335,28 @@ pub mod root { } #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_293() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_294() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_295() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36525,7 +36367,18 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_294() { + fn __bindgen_test_layout_already_AddRefed_instantiation_296() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_297() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36536,7 +36389,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_295() { + fn __bindgen_test_layout_already_AddRefed_instantiation_298() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36547,7 +36400,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_296() { + fn __bindgen_test_layout_DefaultDelete_instantiation_299() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36558,7 +36411,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_297() { + fn __bindgen_test_layout_UniquePtr_instantiation_300() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36569,7 +36422,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_298() { + fn __bindgen_test_layout_DefaultDelete_instantiation_301() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36580,7 +36433,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_299() { + fn __bindgen_test_layout_UniquePtr_instantiation_302() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36591,7 +36444,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_300() { + fn __bindgen_test_layout_already_AddRefed_instantiation_303() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36602,7 +36455,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_301() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_304() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -36611,7 +36464,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_302() { + fn __bindgen_test_layout_nsTArray_instantiation_305() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36622,7 +36475,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_303() { + fn __bindgen_test_layout_already_AddRefed_instantiation_306() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36633,7 +36486,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_304() { + fn __bindgen_test_layout_already_AddRefed_instantiation_307() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36644,7 +36497,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_305() { + fn __bindgen_test_layout_Maybe_instantiation_308() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36655,7 +36508,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_306() { + fn __bindgen_test_layout_Maybe_instantiation_309() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36666,7 +36519,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_307() { + fn __bindgen_test_layout_already_AddRefed_instantiation_310() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36677,7 +36530,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_308() { + fn __bindgen_test_layout_already_AddRefed_instantiation_311() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36688,7 +36541,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_309() { + fn __bindgen_test_layout_DefaultDelete_instantiation_312() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36699,7 +36552,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_310() { + fn __bindgen_test_layout_UniquePtr_instantiation_313() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36710,7 +36563,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_311() { + fn __bindgen_test_layout_DefaultDelete_instantiation_314() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36721,7 +36574,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_312() { + fn __bindgen_test_layout_UniquePtr_instantiation_315() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36732,7 +36585,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_313() { + fn __bindgen_test_layout_already_AddRefed_instantiation_316() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36743,7 +36596,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_314() { + fn __bindgen_test_layout_Maybe_instantiation_317() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36754,7 +36607,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_315() { + fn __bindgen_test_layout_DefaultDelete_instantiation_318() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36765,7 +36618,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_316() { + fn __bindgen_test_layout_DefaultDelete_instantiation_319() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36776,7 +36629,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_317() { + fn __bindgen_test_layout_pair_instantiation_320() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36787,7 +36640,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_318() { + fn __bindgen_test_layout_nsTArray_instantiation_321() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -36802,7 +36655,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_319() { + fn __bindgen_test_layout_already_AddRefed_instantiation_322() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36813,7 +36666,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_320() { + fn __bindgen_test_layout_nsTArray_instantiation_323() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36824,7 +36677,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_321() { + fn __bindgen_test_layout_nsTArray_instantiation_324() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36835,7 +36688,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_322() { + fn __bindgen_test_layout_nsTArray_instantiation_325() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36846,7 +36699,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_323() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_326() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36857,7 +36710,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsStyleAutoArray_instantiation_324() { + fn __bindgen_test_layout_nsStyleAutoArray_instantiation_327() { assert_eq!(::std::mem::size_of::>() , 64usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36868,7 +36721,7 @@ pub mod root { root::nsStyleAutoArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_325() { + fn __bindgen_test_layout_DefaultDelete_instantiation_328() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36879,7 +36732,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_326() { + fn __bindgen_test_layout_UniquePtr_instantiation_329() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36890,7 +36743,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_327() { + fn __bindgen_test_layout_DefaultDelete_instantiation_330() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36901,7 +36754,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_328() { + fn __bindgen_test_layout_UniquePtr_instantiation_331() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36912,7 +36765,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_329() { + fn __bindgen_test_layout_Maybe_instantiation_332() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36923,7 +36776,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_330() { + fn __bindgen_test_layout_Maybe_instantiation_333() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36934,7 +36787,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_331() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_334() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36945,7 +36798,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_332() { + fn __bindgen_test_layout_already_AddRefed_instantiation_335() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36956,7 +36809,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_333() { + fn __bindgen_test_layout_already_AddRefed_instantiation_336() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36967,7 +36820,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_334() { + fn __bindgen_test_layout_nsTArray_instantiation_337() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36978,7 +36831,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_335() { + fn __bindgen_test_layout_nsTArray_instantiation_338() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36989,7 +36842,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_336() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_339() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37000,7 +36853,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_337() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_340() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37013,7 +36866,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_338() { + fn __bindgen_test_layout_already_AddRefed_instantiation_341() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37024,7 +36877,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_339() { + fn __bindgen_test_layout_nsTArray_instantiation_342() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37037,7 +36890,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_340() { + fn __bindgen_test_layout_Handle_instantiation_343() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37048,7 +36901,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_341() { + fn __bindgen_test_layout_Handle_instantiation_344() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37059,7 +36912,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_342() { + fn __bindgen_test_layout_RefPtr_instantiation_345() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37070,37 +36923,6 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_343() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_344() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Sequence_instantiation_345() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_346() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -37112,13 +36934,15 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_347() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + fn __bindgen_test_layout_MutableHandle_instantiation_347() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::JS::MutableHandle ) )); } #[test] fn __bindgen_test_layout_Sequence_instantiation_348() { @@ -37141,26 +36965,22 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_350() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_Sequence_instantiation_350() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + u64 ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_351() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_Sequence_instantiation_351() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); + u64 ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_352() { @@ -37174,18 +36994,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_353() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_354() { + fn __bindgen_test_layout_Handle_instantiation_353() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37196,26 +37005,37 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_355() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( + fn __bindgen_test_layout_MutableHandle_instantiation_354() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); + root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_356() { - assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! - ( + fn __bindgen_test_layout_Handle_instantiation_355() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! - ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - [u64; 6usize] ) )); + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_356() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_357() { @@ -37229,26 +37049,26 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_358() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_358() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); + root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_359() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsClassHashtable_instantiation_359() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + [u64; 6usize] ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_360() { @@ -37263,6 +37083,39 @@ pub mod root { } #[test] fn __bindgen_test_layout_nsTArray_instantiation_361() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_362() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_363() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_364() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37273,7 +37126,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_362() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_365() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/gecko/generated/structs_release.rs b/servo/components/style/gecko/generated/structs_release.rs index d9480e2fdfaf..bbfaaee933ac 100644 --- a/servo/components/style/gecko/generated/structs_release.rs +++ b/servo/components/style/gecko/generated/structs_release.rs @@ -971,7 +971,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1170,16 +1169,6 @@ pub mod root { use self::super::super::root; #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct __is_swappable { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __is_nothrow_swappable { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct pair<_T1, _T2> { pub first: _T1, pub second: _T2, @@ -1188,8 +1177,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__PCCP = u8; - pub type pair__PCCFP = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1219,17 +1206,10 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __iterator_traits { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1293,9 +1273,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = - root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1385,9 +1364,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -5027,7 +5006,7 @@ pub mod root { pub mDataset: *mut root::nsDOMStringMap, /** * SMIL Overridde style rules (for SMIL animation of CSS properties) - * @see Element::GetSMILOverrideStyle + * @see nsIContent::GetSMILOverrideStyle */ pub mSMILOverrideStyle: root::nsCOMPtr, /** @@ -6339,6 +6318,7 @@ pub mod root { Normal = 0, ForReconstruct = 1, ForAnimationOnly = 2, + ForCSSRuleChanges = 3, } pub const UpdateAnimationsTasks_CSSAnimations: root::mozilla::UpdateAnimationsTasks = @@ -9018,8 +8998,6 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_instantiation_3() { assert_eq!(::std::mem::size_of::() , @@ -12495,11 +12473,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12653,113 +12626,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { - let bitfield_unit_val = - { - let bitfield_unit_val = { 0 }; - let isMuted = isMuted as u8 as u8; - let mask = 1usize as u8; - let isMuted = (isMuted << 0usize) & mask; - bitfield_unit_val | isMuted - }; - let ownsLinebuf_ = ownsLinebuf_ as u8 as u8; - let mask = 2usize as u8; - let ownsLinebuf_ = (ownsLinebuf_ << 1usize) & mask; - bitfield_unit_val | ownsLinebuf_ - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -13731,7 +13597,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -13836,7 +13702,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -13939,7 +13805,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -16382,7 +16248,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -22493,57 +22359,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_76 = - _bindgen_ty_76::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_76 { + pub enum _bindgen_ty_82 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -27714,7 +27580,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -28854,7 +28720,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -28881,8 +28747,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -30377,7 +30243,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_79() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_85() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30388,7 +30254,7 @@ pub mod root { root::mozilla::StaticRefPtr ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_80() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_86() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32533,7 +32399,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray; + root::nsTArray>; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -32900,48 +32766,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_78 + root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_84 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_78 = - _bindgen_ty_78::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_78 { + pub enum _bindgen_ty_84 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -33672,22 +33538,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct _bindgen_ty_29 { - pub _address: u8, - } - impl Clone for _bindgen_ty_29 { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct _bindgen_ty_30 { - pub _address: u8, - } - impl Clone for _bindgen_ty_30 { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, @@ -33726,7 +33576,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_81() { + fn __bindgen_test_layout_IntegralConstant_instantiation_87() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33735,7 +33585,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_82() { + fn __bindgen_test_layout_IntegralConstant_instantiation_88() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33744,80 +33594,6 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_83() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_84() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_85() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - } - #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_86() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_87() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_88() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - } - #[test] fn __bindgen_test_layout_nsCharTraits_instantiation_89() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( @@ -33829,7 +33605,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_90() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_90() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_instantiation_91() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_instantiation_92() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33840,7 +33638,51 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_183129_instantiation_91() { + fn __bindgen_test_layout_nsReadingIterator_instantiation_93() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator<::std::os::raw::c_char> ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_instantiation_94() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator<::std::os::raw::c_char> ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_instantiation_95() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_instantiation_96() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout__bindgen_ty_id_206916_instantiation_97() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33849,7 +33691,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_183165_instantiation_92() { + fn __bindgen_test_layout__bindgen_ty_id_206952_instantiation_98() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33858,7 +33700,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_93() { + fn __bindgen_test_layout_nsTArray_instantiation_99() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33869,7 +33711,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_94() { + fn __bindgen_test_layout_Handle_instantiation_100() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33880,7 +33722,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_95() { + fn __bindgen_test_layout_Handle_instantiation_101() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33891,7 +33733,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_96() { + fn __bindgen_test_layout_MutableHandle_instantiation_102() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33902,7 +33744,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_97() { + fn __bindgen_test_layout_Rooted_instantiation_103() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33913,7 +33755,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_98() { + fn __bindgen_test_layout_DeletePolicy_instantiation_104() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33924,7 +33766,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_99() { + fn __bindgen_test_layout_nsTArray_instantiation_105() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33935,7 +33777,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_100() { + fn __bindgen_test_layout_nsTArray_instantiation_106() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33946,29 +33788,29 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_101() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_107() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_102() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_108() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_103() { + fn __bindgen_test_layout_nsTArray_instantiation_109() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33979,7 +33821,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_104() { + fn __bindgen_test_layout_TErrorResult_instantiation_110() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33990,7 +33832,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_105() { + fn __bindgen_test_layout_TErrorResult_instantiation_111() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34001,7 +33843,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_106() { + fn __bindgen_test_layout_already_AddRefed_instantiation_112() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34012,72 +33854,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_107() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_108() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_109() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_110() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_111() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_112() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_113() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -34089,7 +33865,73 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_114() { + fn __bindgen_test_layout_MutableHandle_instantiation_114() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_115() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_116() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_117() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_118() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_119() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_120() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34100,7 +33942,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_115() { + fn __bindgen_test_layout_already_AddRefed_instantiation_121() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34111,7 +33953,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_116() { + fn __bindgen_test_layout_already_AddRefed_instantiation_122() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34122,7 +33964,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_117() { + fn __bindgen_test_layout_Handle_instantiation_123() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34133,7 +33975,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_118() { + fn __bindgen_test_layout_MutableHandle_instantiation_124() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34144,7 +33986,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_119() { + fn __bindgen_test_layout_MutableHandle_instantiation_125() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34155,72 +33997,6 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_120() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_121() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_122() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_123() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_124() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_125() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] fn __bindgen_test_layout_DeletePolicy_instantiation_126() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( @@ -34255,6 +34031,28 @@ pub mod root { } #[test] fn __bindgen_test_layout_UniquePtr_instantiation_129() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_130() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_131() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34265,7 +34063,51 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_130() { + fn __bindgen_test_layout_DeletePolicy_instantiation_132() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_133() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_134() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_135() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_iterator_instantiation_136() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34276,7 +34118,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_131() { + fn __bindgen_test_layout_DeletePolicy_instantiation_137() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34287,7 +34129,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_132() { + fn __bindgen_test_layout_UniquePtr_instantiation_138() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34298,7 +34140,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_133() { + fn __bindgen_test_layout_DeletePolicy_instantiation_139() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34309,7 +34151,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_134() { + fn __bindgen_test_layout_UniquePtr_instantiation_140() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34320,7 +34162,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_135() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_141() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34331,7 +34173,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_136() { + fn __bindgen_test_layout_Handle_instantiation_142() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34342,7 +34184,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_137() { + fn __bindgen_test_layout_MutableHandle_instantiation_143() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34353,7 +34195,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_138() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_144() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34364,7 +34206,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_139() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_145() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34375,7 +34217,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_140() { + fn __bindgen_test_layout_nsTArray_instantiation_146() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34386,7 +34228,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_141() { + fn __bindgen_test_layout_nsTArray_instantiation_147() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34397,7 +34239,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_142() { + fn __bindgen_test_layout_Heap_instantiation_148() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34408,7 +34250,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_143() { + fn __bindgen_test_layout_Heap_instantiation_149() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34419,7 +34261,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_144() { + fn __bindgen_test_layout_TenuredHeap_instantiation_150() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34430,7 +34272,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_145() { + fn __bindgen_test_layout_already_AddRefed_instantiation_151() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34441,7 +34283,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_146() { + fn __bindgen_test_layout_nsTArray_instantiation_152() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34454,7 +34296,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_147() { + fn __bindgen_test_layout_RefPtr_instantiation_153() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34465,7 +34307,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_148() { + fn __bindgen_test_layout_RefPtr_instantiation_154() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34476,7 +34318,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_149() { + fn __bindgen_test_layout_RefPtr_instantiation_155() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34487,7 +34329,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_150() { + fn __bindgen_test_layout_nsTArray_instantiation_156() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34500,7 +34342,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_151() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_157() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34511,7 +34353,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_152() { + fn __bindgen_test_layout_nsTArray_instantiation_158() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34522,7 +34364,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_153() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_159() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34533,7 +34375,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_154() { + fn __bindgen_test_layout_already_AddRefed_instantiation_160() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34544,7 +34386,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_155() { + fn __bindgen_test_layout_already_AddRefed_instantiation_161() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34555,7 +34397,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_156() { + fn __bindgen_test_layout_RefPtr_instantiation_162() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34566,7 +34408,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_157() { + fn __bindgen_test_layout_already_AddRefed_instantiation_163() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34577,7 +34419,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_158() { + fn __bindgen_test_layout_MutableHandle_instantiation_164() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34588,7 +34430,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_159() { + fn __bindgen_test_layout_already_AddRefed_instantiation_165() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34599,7 +34441,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_160() { + fn __bindgen_test_layout_already_AddRefed_instantiation_166() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34610,7 +34452,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_161() { + fn __bindgen_test_layout_already_AddRefed_instantiation_167() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34621,7 +34463,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_162() { + fn __bindgen_test_layout_RefPtr_instantiation_168() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34632,7 +34474,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_163() { + fn __bindgen_test_layout_nsTArray_instantiation_169() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34645,7 +34487,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_164() { + fn __bindgen_test_layout_Handle_instantiation_170() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34656,7 +34498,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_165() { + fn __bindgen_test_layout_already_AddRefed_instantiation_171() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34667,7 +34509,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_166() { + fn __bindgen_test_layout_already_AddRefed_instantiation_172() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34678,7 +34520,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_167() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_173() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34689,81 +34531,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_168() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsCOMPtr_instantiation_174() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_169() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_170() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_171() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_172() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_173() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_174() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + root::nsCOMPtr ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_175() { @@ -34777,7 +34553,84 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_176() { + fn __bindgen_test_layout_DefaultDelete_instantiation_176() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_177() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_178() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_179() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_180() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_181() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_182() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_183() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34790,7 +34643,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_177() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_184() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34801,7 +34654,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_178() { + fn __bindgen_test_layout_Handle_instantiation_185() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34812,7 +34665,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_179() { + fn __bindgen_test_layout_nsTArray_instantiation_186() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34823,7 +34676,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_180() { + fn __bindgen_test_layout_nsTArray_instantiation_187() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34834,7 +34687,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_181() { + fn __bindgen_test_layout_already_AddRefed_instantiation_188() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34845,7 +34698,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_182() { + fn __bindgen_test_layout_already_AddRefed_instantiation_189() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34856,7 +34709,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_183() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_190() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -34865,83 +34718,6 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_184() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_185() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_186() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_187() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_188() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_189() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_190() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_191() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -34953,291 +34729,51 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_192() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_194() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_195() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_196() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_197() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_198() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_199() { - assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_200() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_201() { - assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_202() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_203() { - assert_eq!(::std::mem::size_of::>() , + fn __bindgen_test_layout_nsTArray_instantiation_192() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_204() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_DefaultDelete_instantiation_193() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_205() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_WeakPtr_instantiation_207() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_208() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_194() { + assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); + root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_209() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_instantiation_195() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_210() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_211() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_212() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_213() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_214() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_215() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_216() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_217() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_218() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_196() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35248,7 +34784,324 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_219() { + fn __bindgen_test_layout_nsTArray_instantiation_197() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_198() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_199() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_200() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_201() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_202() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_203() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_204() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_205() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_206() { + assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_207() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_208() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_209() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_210() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_211() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_212() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_213() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_WeakPtr_instantiation_214() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_215() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_216() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_217() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_218() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_219() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_220() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_221() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_222() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_223() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_224() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_225() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_226() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35259,7 +35112,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_220() { + fn __bindgen_test_layout_PointTyped_instantiation_227() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35270,7 +35123,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_221() { + fn __bindgen_test_layout_IntPointTyped_instantiation_228() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35281,7 +35134,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_222() { + fn __bindgen_test_layout_SizeTyped_instantiation_229() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35292,7 +35145,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_223() { + fn __bindgen_test_layout_RectTyped_instantiation_230() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35303,7 +35156,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_224() { + fn __bindgen_test_layout_IntPointTyped_instantiation_231() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35314,7 +35167,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_225() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_232() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35325,7 +35178,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_226() { + fn __bindgen_test_layout_IntRectTyped_instantiation_233() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35336,7 +35189,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_227() { + fn __bindgen_test_layout_MarginTyped_instantiation_234() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35347,7 +35200,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_228() { + fn __bindgen_test_layout_RectTyped_instantiation_235() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35358,7 +35211,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_229() { + fn __bindgen_test_layout_IntRectTyped_instantiation_236() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35369,7 +35222,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_230() { + fn __bindgen_test_layout_ScaleFactor_instantiation_237() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -35378,7 +35231,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_231() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_238() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35389,7 +35242,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_232() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_239() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35400,7 +35253,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_233() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_240() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35411,7 +35264,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_234() { + fn __bindgen_test_layout_already_AddRefed_instantiation_241() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35422,7 +35275,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_235() { + fn __bindgen_test_layout_already_AddRefed_instantiation_242() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35433,7 +35286,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_236() { + fn __bindgen_test_layout_nsTArray_instantiation_243() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35446,7 +35299,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_237() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_244() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35457,7 +35310,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_238() { + fn __bindgen_test_layout_already_AddRefed_instantiation_245() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35468,7 +35321,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_239() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_246() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35479,7 +35332,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_240() { + fn __bindgen_test_layout_MutableHandle_instantiation_247() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35490,7 +35343,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_241() { + fn __bindgen_test_layout_MutableHandle_instantiation_248() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35501,7 +35354,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_242() { + fn __bindgen_test_layout_already_AddRefed_instantiation_249() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35512,7 +35365,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_243() { + fn __bindgen_test_layout_DefaultDelete_instantiation_250() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35523,7 +35376,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_244() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_251() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35534,7 +35387,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_245() { + fn __bindgen_test_layout_Rooted_instantiation_252() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35545,7 +35398,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_246() { + fn __bindgen_test_layout_Rooted_instantiation_253() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35556,7 +35409,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_247() { + fn __bindgen_test_layout_already_AddRefed_instantiation_254() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35567,7 +35420,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_248() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_255() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35578,7 +35431,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_249() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_256() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35589,7 +35442,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_250() { + fn __bindgen_test_layout_nsTArray_instantiation_257() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35600,7 +35453,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_251() { + fn __bindgen_test_layout_Handle_instantiation_258() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35611,7 +35464,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_252() { + fn __bindgen_test_layout_MutableHandle_instantiation_259() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35622,7 +35475,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_253() { + fn __bindgen_test_layout_Handle_instantiation_260() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35633,7 +35486,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_254() { + fn __bindgen_test_layout_MutableHandle_instantiation_261() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35644,7 +35497,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_255() { + fn __bindgen_test_layout_nsTArray_instantiation_262() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35655,7 +35508,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_256() { + fn __bindgen_test_layout_Handle_instantiation_263() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35666,7 +35519,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_257() { + fn __bindgen_test_layout_already_AddRefed_instantiation_264() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35677,7 +35530,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_258() { + fn __bindgen_test_layout_already_AddRefed_instantiation_265() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35688,7 +35541,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_259() { + fn __bindgen_test_layout_Handle_instantiation_266() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35699,7 +35552,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_260() { + fn __bindgen_test_layout_nsTArray_instantiation_267() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35710,7 +35563,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_261() { + fn __bindgen_test_layout_RefPtr_instantiation_268() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35723,7 +35576,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_262() { + fn __bindgen_test_layout_nsTArray_instantiation_269() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35736,7 +35589,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_263() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_270() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35747,7 +35600,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_264() { + fn __bindgen_test_layout_RefPtr_instantiation_271() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35760,7 +35613,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_265() { + fn __bindgen_test_layout_UniquePtr_instantiation_272() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35771,7 +35624,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_266() { + fn __bindgen_test_layout_nsTArray_instantiation_273() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35782,7 +35635,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_267() { + fn __bindgen_test_layout_Handle_instantiation_274() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35793,7 +35646,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_268() { + fn __bindgen_test_layout_MutableHandle_instantiation_275() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35804,7 +35657,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_269() { + fn __bindgen_test_layout_Handle_instantiation_276() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35815,7 +35668,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_270() { + fn __bindgen_test_layout_MutableHandle_instantiation_277() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35826,7 +35679,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_271() { + fn __bindgen_test_layout_already_AddRefed_instantiation_278() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35837,7 +35690,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_272() { + fn __bindgen_test_layout_already_AddRefed_instantiation_279() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35848,7 +35701,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_273() { + fn __bindgen_test_layout_already_AddRefed_instantiation_280() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35859,7 +35712,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_274() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_281() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35870,7 +35723,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_275() { + fn __bindgen_test_layout_OwningNonNull_instantiation_282() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35883,7 +35736,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_276() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_283() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35894,7 +35747,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_277() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_284() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35905,7 +35758,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_278() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_285() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35916,7 +35769,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_279() { + fn __bindgen_test_layout_DefaultDelete_instantiation_286() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35927,7 +35780,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_280() { + fn __bindgen_test_layout_already_AddRefed_instantiation_287() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35938,7 +35791,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_281() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_288() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35949,7 +35802,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_282() { + fn __bindgen_test_layout_already_AddRefed_instantiation_289() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35960,7 +35813,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_283() { + fn __bindgen_test_layout_already_AddRefed_instantiation_290() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35971,7 +35824,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_284() { + fn __bindgen_test_layout_already_AddRefed_instantiation_291() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35982,7 +35835,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_285() { + fn __bindgen_test_layout_already_AddRefed_instantiation_292() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35993,7 +35846,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_286() { + fn __bindgen_test_layout_already_AddRefed_instantiation_293() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36004,7 +35857,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_287() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_294() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36015,7 +35868,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_288() { + fn __bindgen_test_layout_already_AddRefed_instantiation_295() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36026,7 +35879,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_289() { + fn __bindgen_test_layout_DefaultDelete_instantiation_296() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36037,7 +35890,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_290() { + fn __bindgen_test_layout_UniquePtr_instantiation_297() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36048,7 +35901,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_291() { + fn __bindgen_test_layout_DefaultDelete_instantiation_298() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36059,7 +35912,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_292() { + fn __bindgen_test_layout_UniquePtr_instantiation_299() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36070,7 +35923,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_293() { + fn __bindgen_test_layout_already_AddRefed_instantiation_300() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36081,7 +35934,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_294() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_301() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -36090,7 +35943,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_295() { + fn __bindgen_test_layout_nsTArray_instantiation_302() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36101,7 +35954,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_296() { + fn __bindgen_test_layout_already_AddRefed_instantiation_303() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36112,7 +35965,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_297() { + fn __bindgen_test_layout_already_AddRefed_instantiation_304() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36123,7 +35976,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_298() { + fn __bindgen_test_layout_Maybe_instantiation_305() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36134,7 +35987,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_299() { + fn __bindgen_test_layout_Maybe_instantiation_306() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36145,7 +35998,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_300() { + fn __bindgen_test_layout_already_AddRefed_instantiation_307() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36156,7 +36009,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_301() { + fn __bindgen_test_layout_already_AddRefed_instantiation_308() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36167,83 +36020,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_302() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_303() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_304() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_305() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_306() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_307() { - assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_308() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] fn __bindgen_test_layout_DefaultDelete_instantiation_309() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( @@ -36255,7 +36031,84 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_310() { + fn __bindgen_test_layout_UniquePtr_instantiation_310() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_311() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_312() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_313() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_314() { + assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_315() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_316() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_pair_instantiation_317() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36266,7 +36119,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_311() { + fn __bindgen_test_layout_nsTArray_instantiation_318() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -36281,7 +36134,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_312() { + fn __bindgen_test_layout_already_AddRefed_instantiation_319() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36292,7 +36145,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_313() { + fn __bindgen_test_layout_nsTArray_instantiation_320() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36303,7 +36156,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_314() { + fn __bindgen_test_layout_nsTArray_instantiation_321() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36314,7 +36167,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_315() { + fn __bindgen_test_layout_nsTArray_instantiation_322() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36325,7 +36178,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_316() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_323() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36336,7 +36189,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsStyleAutoArray_instantiation_317() { + fn __bindgen_test_layout_nsStyleAutoArray_instantiation_324() { assert_eq!(::std::mem::size_of::>() , 64usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36347,7 +36200,7 @@ pub mod root { root::nsStyleAutoArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_318() { + fn __bindgen_test_layout_DefaultDelete_instantiation_325() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36358,7 +36211,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_319() { + fn __bindgen_test_layout_UniquePtr_instantiation_326() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36369,7 +36222,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_320() { + fn __bindgen_test_layout_DefaultDelete_instantiation_327() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36380,7 +36233,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_321() { + fn __bindgen_test_layout_UniquePtr_instantiation_328() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36391,7 +36244,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_322() { + fn __bindgen_test_layout_Maybe_instantiation_329() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36402,7 +36255,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_323() { + fn __bindgen_test_layout_Maybe_instantiation_330() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36413,7 +36266,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_324() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_331() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36424,7 +36277,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_325() { + fn __bindgen_test_layout_already_AddRefed_instantiation_332() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36435,7 +36288,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_326() { + fn __bindgen_test_layout_already_AddRefed_instantiation_333() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36446,7 +36299,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_327() { + fn __bindgen_test_layout_nsTArray_instantiation_334() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36457,7 +36310,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_328() { + fn __bindgen_test_layout_nsTArray_instantiation_335() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36468,7 +36321,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_329() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_336() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36479,7 +36332,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_330() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_337() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36492,7 +36345,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_331() { + fn __bindgen_test_layout_already_AddRefed_instantiation_338() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36503,7 +36356,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_332() { + fn __bindgen_test_layout_nsTArray_instantiation_339() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36516,7 +36369,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_333() { + fn __bindgen_test_layout_Handle_instantiation_340() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36527,7 +36380,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_334() { + fn __bindgen_test_layout_Handle_instantiation_341() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36538,7 +36391,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_335() { + fn __bindgen_test_layout_RefPtr_instantiation_342() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36549,86 +36402,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_336() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_337() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Sequence_instantiation_338() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_339() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Sequence_instantiation_340() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Sequence_instantiation_341() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_342() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_343() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + root::JS::Handle ) )); } #[test] fn __bindgen_test_layout_MutableHandle_instantiation_344() { @@ -36642,7 +36424,16 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_345() { + fn __bindgen_test_layout_Sequence_instantiation_345() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_346() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36653,48 +36444,33 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_346() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_Sequence_instantiation_347() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); + u64 ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_347() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_Sequence_instantiation_348() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_348() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( + fn __bindgen_test_layout_Handle_instantiation_349() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_349() { - assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 5usize] ) )); + root::JS::Handle ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_350() { @@ -36708,29 +36484,40 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_351() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_352() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_MutableHandle_instantiation_351() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_353() { + fn __bindgen_test_layout_Handle_instantiation_352() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_353() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_354() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36741,7 +36528,73 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_354() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_355() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsClassHashtable_instantiation_356() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_357() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_358() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_359() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_360() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_361() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36752,7 +36605,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_355() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_362() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/matching.rs b/servo/components/style/matching.rs index 12fb21931ea8..0496f72afbf1 100644 --- a/servo/components/style/matching.rs +++ b/servo/components/style/matching.rs @@ -366,6 +366,7 @@ trait PrivateMatchMethods: TElement { #[cfg(feature = "gecko")] fn needs_animations_update(&self, + context: &mut StyleContext, old_values: Option<&Arc>, new_values: &ComputedValues) -> bool { @@ -378,7 +379,10 @@ trait PrivateMatchMethods: TElement { let old_box_style = old.get_box(); let old_display_style = old_box_style.clone_display(); let new_display_style = new_box_style.clone_display(); - // FIXME: Bug 1344581: We still need to compare keyframe rules. + + // If the traverse is triggered by CSS rule changes, + // we need to try to update all CSS animations. + context.shared.traversal_flags.for_css_rule_changes() || !old_box_style.animations_equals(&new_box_style) || (old_display_style == display::T::none && new_display_style != display::T::none && @@ -400,7 +404,7 @@ trait PrivateMatchMethods: TElement { use context::UpdateAnimationsTasks; let mut tasks = UpdateAnimationsTasks::empty(); - if self.needs_animations_update(old_values.as_ref(), new_values) { + if self.needs_animations_update(context, old_values.as_ref(), new_values) { tasks.insert(CSS_ANIMATIONS); } diff --git a/servo/components/style/traversal.rs b/servo/components/style/traversal.rs index f1f1a26342d7..63c7dfd68e9a 100644 --- a/servo/components/style/traversal.rs +++ b/servo/components/style/traversal.rs @@ -37,6 +37,10 @@ bitflags! { const ANIMATION_ONLY = 0x02, /// Traverse without generating any change hints. const FOR_RECONSTRUCT = 0x04, + /// Traverse triggered by CSS rule changes. + /// Traverse and update all elements with CSS animations since + /// @keyframes rules may have changed + const FOR_CSS_RULE_CHANGES = 0x08, } } @@ -55,6 +59,11 @@ impl TraversalFlags { pub fn for_reconstruct(&self) -> bool { self.contains(FOR_RECONSTRUCT) } + + /// Returns true if the traversal is triggered by CSS rule changes. + pub fn for_css_rule_changes(&self) -> bool { + self.contains(FOR_CSS_RULE_CHANGES) + } } /// This structure exists to enforce that callers invoke pre_traverse, and also diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index a78a43ef3955..bc4db3e7204a 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -103,7 +103,7 @@ use style::stylesheets::StylesheetLoader as StyleStylesheetLoader; use style::supports::parse_condition_or_declaration; use style::thread_state; use style::timer::Timer; -use style::traversal::{ANIMATION_ONLY, FOR_RECONSTRUCT, UNSTYLED_CHILDREN_ONLY}; +use style::traversal::{ANIMATION_ONLY, FOR_CSS_RULE_CHANGES, FOR_RECONSTRUCT, UNSTYLED_CHILDREN_ONLY}; use style::traversal::{resolve_style, DomTraversal, TraversalDriver, TraversalFlags}; use style::values::{CustomIdent, KeyframesName}; use style_traits::ToCss; @@ -252,10 +252,11 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed, let traversal_flags = match (root_behavior, restyle_behavior) { (Root::Normal, Restyle::Normal) | (Root::Normal, Restyle::ForAnimationOnly) - => TraversalFlags::empty(), + => TraversalFlags::empty(), (Root::UnstyledChildrenOnly, Restyle::Normal) | (Root::UnstyledChildrenOnly, Restyle::ForAnimationOnly) - => UNSTYLED_CHILDREN_ONLY, + => UNSTYLED_CHILDREN_ONLY, + (Root::Normal, Restyle::ForCSSRuleChanges) => FOR_CSS_RULE_CHANGES, (Root::Normal, Restyle::ForReconstruct) => FOR_RECONSTRUCT, _ => panic!("invalid combination of TraversalRootBehavior and TraversalRestyleBehavior"), }; From af7f65eb83d39c9ff9113f0c4090186e4b29f71c Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sun, 21 May 2017 05:28:58 -0500 Subject: [PATCH 03/35] servo: Merge #16976 - Add sugar for already_AddRefed (from upsuper:bug1366247); r=nox This is Servo side change of [bug 1366247](https://bugzilla.mozilla.org/show_bug.cgi?id=1366247). Source-Repo: https://github.com/servo/servo Source-Revision: 3d40b516c8ac6e946cadace2378581cbac7b1e1b --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : ff64fccb8b8d32b91885f4b7eb9663aa03d9ac85 --- .../style/gecko/generated/bindings.rs | 7 +-- servo/components/style/gecko/wrapper.rs | 7 +-- .../gecko_bindings/sugar/already_addrefed.rs | 48 +++++++++++++++++++ .../style/gecko_bindings/sugar/mod.rs | 1 + .../gecko_bindings/sugar/ns_css_value.rs | 2 +- .../style/gecko_string_cache/mod.rs | 36 +++++++------- servo/ports/geckolib/glue.rs | 6 ++- 7 files changed, 79 insertions(+), 28 deletions(-) create mode 100644 servo/components/style/gecko_bindings/sugar/already_addrefed.rs diff --git a/servo/components/style/gecko/generated/bindings.rs b/servo/components/style/gecko/generated/bindings.rs index c88d389bd3b4..2987408705d1 100644 --- a/servo/components/style/gecko/generated/bindings.rs +++ b/servo/components/style/gecko/generated/bindings.rs @@ -1,13 +1,13 @@ /* automatically generated by rust-bindgen */ pub use nsstring::{nsACString, nsAString, nsString, nsStringRepr}; -use gecko_bindings::structs::nsTArray; type nsACString_internal = nsACString; type nsAString_internal = nsAString; use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue; use gecko_bindings::structs::mozilla::css::ImageValue; use gecko_bindings::structs::mozilla::css::URLValue; use gecko_bindings::structs::mozilla::Side; +use gecko_bindings::structs::already_AddRefed; use gecko_bindings::structs::RawGeckoAnimationPropertySegment; use gecko_bindings::structs::RawGeckoComputedTiming; use gecko_bindings::structs::RawGeckoCSSPropertyIDList; @@ -190,6 +190,7 @@ unsafe impl Sync for nsStyleVisibility {} use gecko_bindings::structs::nsStyleXUL; unsafe impl Send for nsStyleXUL {} unsafe impl Sync for nsStyleXUL {} +use gecko_bindings::structs::nsTArray; use gecko_bindings::structs::nsTimingFunction; use gecko_bindings::structs::nscolor; use gecko_bindings::structs::nscoord; @@ -1237,7 +1238,7 @@ extern "C" { } extern "C" { pub fn Gecko_CSSValue_SetAtomIdent(css_value: nsCSSValueBorrowedMut, - atom: *mut nsIAtom); + atom: already_AddRefed); } extern "C" { pub fn Gecko_CSSValue_SetArray(css_value: nsCSSValueBorrowedMut, @@ -1981,7 +1982,7 @@ extern "C" { } extern "C" { pub fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, - name: *mut nsIAtom); + name: already_AddRefed); } extern "C" { pub fn Servo_KeyframesRule_GetCount(rule: RawServoKeyframesRuleBorrowed) diff --git a/servo/components/style/gecko/wrapper.rs b/servo/components/style/gecko/wrapper.rs index e043ff572232..71e26e104a45 100644 --- a/servo/components/style/gecko/wrapper.rs +++ b/servo/components/style/gecko/wrapper.rs @@ -54,6 +54,7 @@ use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT; use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel; use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS; +use gecko_bindings::structs::already_AddRefed; use gecko_bindings::sugar::ownership::HasArcFFI; use logical_geometry::WritingMode; use media_queries::Device; @@ -1074,13 +1075,13 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> { // // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#language let ptr = unsafe { - bindings::Gecko_GetXMLLangValue(self.0) + already_AddRefed::new(bindings::Gecko_GetXMLLangValue(self.0)) }; - if !ptr.is_null() { + if let Some(ptr) = ptr { let global_style_data = &*GLOBAL_STYLE_DATA; let pdb = PropertyDeclarationBlock::with_one( - PropertyDeclaration::XLang(SpecifiedLang(unsafe { Atom::from_addrefed(ptr) })), + PropertyDeclaration::XLang(SpecifiedLang(ptr.into())), Importance::Normal ); let arc = Arc::new(global_style_data.shared_lock.wrap(pdb)); diff --git a/servo/components/style/gecko_bindings/sugar/already_addrefed.rs b/servo/components/style/gecko_bindings/sugar/already_addrefed.rs new file mode 100644 index 000000000000..01e209fc81f2 --- /dev/null +++ b/servo/components/style/gecko_bindings/sugar/already_addrefed.rs @@ -0,0 +1,48 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//! little helpers for `already_AddRefed`. + +use gecko_bindings::structs::already_AddRefed; +use std::marker::PhantomData; +use std::mem; + +impl already_AddRefed { + /// Create an already_AddRefed from an addrefed pointer. + #[inline] + pub unsafe fn new(ptr: *mut T) -> Option { + if !ptr.is_null() { + Some(Self::new_unchecked(ptr)) + } else { + None + } + } + + /// Create an already_AddRefed from an non-nullable addrefed pointer. + #[inline] + pub unsafe fn new_unchecked(ptr: *mut T) -> Self { + debug_assert!(!ptr.is_null()); + already_AddRefed { + mRawPtr: ptr, + _phantom_0: PhantomData, + } + } + + /// Take the addrefed pointer from this struct. + #[inline] + pub fn take(self) -> *mut T { + let ptr = self.mRawPtr; + mem::forget(self); + ptr + } +} + +#[cfg(debug_assertions)] +impl Drop for already_AddRefed { + fn drop(&mut self) { + // We really should instead mark already_AddRefed must_use, but + // we cannot currently, which is servo/rust-bindgen#710. + unreachable!("Destructor shouldn't be called, otherwise we are leaking") + } +} diff --git a/servo/components/style/gecko_bindings/sugar/mod.rs b/servo/components/style/gecko_bindings/sugar/mod.rs index f241c94810b0..112a8d8e4fa3 100644 --- a/servo/components/style/gecko_bindings/sugar/mod.rs +++ b/servo/components/style/gecko_bindings/sugar/mod.rs @@ -4,6 +4,7 @@ //! Rust sugar and convenience methods for Gecko types. +mod already_addrefed; mod ns_com_ptr; mod ns_compatibility; mod ns_css_shadow_array; diff --git a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs index 0f91fc4f27a4..13c3c5a825c5 100644 --- a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs @@ -152,7 +152,7 @@ impl nsCSSValue { /// Set to an atom identifier value pub fn set_atom_ident(&mut self, s: Atom) { - unsafe { bindings::Gecko_CSSValue_SetAtomIdent(self, s.into_addrefed()) } + unsafe { bindings::Gecko_CSSValue_SetAtomIdent(self, s.into()) } } /// Set to a font format diff --git a/servo/components/style/gecko_string_cache/mod.rs b/servo/components/style/gecko_string_cache/mod.rs index fa89f5eab48d..08933c053ff4 100644 --- a/servo/components/style/gecko_string_cache/mod.rs +++ b/servo/components/style/gecko_string_cache/mod.rs @@ -10,7 +10,7 @@ use gecko_bindings::bindings::Gecko_AddRefAtom; use gecko_bindings::bindings::Gecko_Atomize; use gecko_bindings::bindings::Gecko_Atomize16; use gecko_bindings::bindings::Gecko_ReleaseAtom; -use gecko_bindings::structs::nsIAtom; +use gecko_bindings::structs::{already_AddRefed, nsIAtom}; use nsstring::nsAString; use precomputed_hash::PrecomputedHash; use std::ascii::AsciiExt; @@ -219,24 +219,6 @@ impl Atom { atom } - /// Creates an atom from a dynamic atom pointer that has already had AddRef - /// called on it. - #[inline] - pub unsafe fn from_addrefed(ptr: *mut nsIAtom) -> Self { - debug_assert!(!ptr.is_null()); - unsafe { - Atom(WeakAtom::new(ptr)) - } - } - - /// Convert this atom into an addrefed nsIAtom pointer. - #[inline] - pub fn into_addrefed(self) -> *mut nsIAtom { - let ptr = self.as_ptr(); - mem::forget(self); - ptr - } - /// Return whether two atoms are ASCII-case-insensitive matches pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool { let a = self.as_slice(); @@ -358,3 +340,19 @@ impl From<*mut nsIAtom> for Atom { } } } + +impl From> for Atom { + #[inline] + fn from(ptr: already_AddRefed) -> Atom { + unsafe { Atom(WeakAtom::new(ptr.take())) } + } +} + +impl From for already_AddRefed { + #[inline] + fn from(atom: Atom) -> already_AddRefed { + let ptr = atom.as_ptr(); + mem::forget(atom); + unsafe { already_AddRefed::new_unchecked(ptr) } + } +} diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index bc4db3e7204a..55c031351c84 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -72,6 +72,7 @@ use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; use style::gecko_bindings::structs::ServoElementSnapshotTable; use style::gecko_bindings::structs::URLExtraData; +use style::gecko_bindings::structs::already_AddRefed; use style::gecko_bindings::structs::nsCSSValueSharedList; use style::gecko_bindings::structs::nsCompatibility; use style::gecko_bindings::structs::nsresult; @@ -1005,9 +1006,10 @@ pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowe } #[no_mangle] -pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsIAtom) { +pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, + name: already_AddRefed) { write_locked_arc(rule, |rule: &mut KeyframesRule| { - rule.name = KeyframesName::Ident(CustomIdent(unsafe { Atom::from_addrefed(name) })); + rule.name = KeyframesName::Ident(CustomIdent(name.into())); }) } From 053c72dd641f45ea19fa9ee33d5f54dad83bfdfa Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Sun, 21 May 2017 08:48:10 -0500 Subject: [PATCH 04/35] servo: Merge #16973 - Derive ToComputedValue (from servo:derive-all-the-things); r=emilio Source-Repo: https://github.com/servo/servo Source-Revision: a25b1e5fe3ee1c88a029835e5e27c73fdbdafa2c --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : f8c26d83d4165abdab9715796f11dee457ebbde5 --- servo/components/geometry/lib.rs | 1 - servo/components/style/cascade_info.rs | 2 +- servo/components/style/custom_properties.rs | 4 +- .../style/properties/helpers.mako.rs | 2 +- .../style/properties/longhand/effects.mako.rs | 4 +- .../style/properties/longhand/font.mako.rs | 4 +- .../style/properties/properties.mako.rs | 4 +- servo/components/style/values/computed/mod.rs | 77 ++++++ .../style/values/generics/basic_shape.rs | 142 +--------- .../components/style/values/generics/image.rs | 259 +----------------- servo/components/style/values/generics/mod.rs | 26 +- .../style/values/generics/position.rs | 25 +- servo/components/style/values/mod.rs | 1 - .../components/style/values/specified/calc.rs | 4 +- .../components/style/values/specified/grid.rs | 4 +- .../style/values/specified/length.rs | 4 +- .../style/values/specified/position.rs | 3 +- servo/components/style_derive/lib.rs | 7 + .../style_derive/to_computed_value.rs | 142 ++++++++++ servo/tests/unit/style/parsing/value.rs | 2 +- servo/tests/unit/style/properties/viewport.rs | 2 +- 21 files changed, 269 insertions(+), 450 deletions(-) create mode 100644 servo/components/style_derive/to_computed_value.rs diff --git a/servo/components/geometry/lib.rs b/servo/components/geometry/lib.rs index 453cf0997c5e..8b98301dde7f 100644 --- a/servo/components/geometry/lib.rs +++ b/servo/components/geometry/lib.rs @@ -10,7 +10,6 @@ use app_units::{Au, MAX_AU, MIN_AU}; use euclid::point::Point2D; use euclid::rect::Rect; use euclid::size::Size2D; -use std::i32; // Units for use with euclid::length and euclid::scale_factor. diff --git a/servo/components/style/cascade_info.rs b/servo/components/style/cascade_info.rs index 5c7565909db7..2fdd047dadf1 100644 --- a/servo/components/style/cascade_info.rs +++ b/servo/components/style/cascade_info.rs @@ -8,7 +8,7 @@ use dom::TNode; use properties::{DeclaredValue, PropertyDeclaration}; -use values::HasViewportPercentage; +use style_traits::HasViewportPercentage; /// A structure to collect information about the cascade. /// diff --git a/servo/components/style/custom_properties.rs b/servo/components/style/custom_properties.rs index 071efade790d..15435e4743d8 100644 --- a/servo/components/style/custom_properties.rs +++ b/servo/components/style/custom_properties.rs @@ -14,7 +14,7 @@ use std::ascii::AsciiExt; use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use std::fmt; -use style_traits::ToCss; +use style_traits::{HasViewportPercentage, ToCss}; use stylearc::Arc; /// A custom property name is just an `Atom`. @@ -49,7 +49,7 @@ pub struct SpecifiedValue { references: HashSet, } -impl ::values::HasViewportPercentage for SpecifiedValue { +impl HasViewportPercentage for SpecifiedValue { fn has_viewport_percentage(&self) -> bool { panic!("has_viewport_percentage called before resolving!"); } diff --git a/servo/components/style/properties/helpers.mako.rs b/servo/components/style/properties/helpers.mako.rs index d57f54c24bcb..20da42ab58c2 100644 --- a/servo/components/style/properties/helpers.mako.rs +++ b/servo/components/style/properties/helpers.mako.rs @@ -82,7 +82,7 @@ use smallvec::SmallVec; use std::fmt; #[allow(unused_imports)] - use values::HasViewportPercentage; + use style_traits::HasViewportPercentage; use style_traits::ToCss; pub mod single_value { diff --git a/servo/components/style/properties/longhand/effects.mako.rs b/servo/components/style/properties/longhand/effects.mako.rs index 730142b76a7d..0374ae0dafbb 100644 --- a/servo/components/style/properties/longhand/effects.mako.rs +++ b/servo/components/style/properties/longhand/effects.mako.rs @@ -87,8 +87,8 @@ ${helpers.predefined_type("clip", spec="https://drafts.fxtf.org/filters/#propdef-filter"> //pub use self::computed_value::T as SpecifiedValue; use std::fmt; - use style_traits::ToCss; - use values::{CSSFloat, HasViewportPercentage}; + use style_traits::{HasViewportPercentage, ToCss}; + use values::CSSFloat; use values::specified::{Angle, Length}; #[cfg(feature = "gecko")] use values::specified::Shadow; diff --git a/servo/components/style/properties/longhand/font.mako.rs b/servo/components/style/properties/longhand/font.mako.rs index dc9814c18290..cd60b303436b 100644 --- a/servo/components/style/properties/longhand/font.mako.rs +++ b/servo/components/style/properties/longhand/font.mako.rs @@ -550,8 +550,8 @@ ${helpers.single_keyword_system("font-variant-caps", use properties::longhands::system_font::SystemFont; use properties::style_structs::Font; use std::fmt; - use style_traits::ToCss; - use values::{FONT_MEDIUM_PX, HasViewportPercentage}; + use style_traits::{HasViewportPercentage, ToCss}; + use values::FONT_MEDIUM_PX; use values::specified::{AllowQuirks, FontRelativeLength, LengthOrPercentage}; use values::specified::{NoCalcLength, Percentage}; use values::specified::length::FontBaseSize; diff --git a/servo/components/style/properties/properties.mako.rs b/servo/components/style/properties/properties.mako.rs index 0f4ee1b6843b..d3c85c644702 100644 --- a/servo/components/style/properties/properties.mako.rs +++ b/servo/components/style/properties/properties.mako.rs @@ -34,10 +34,10 @@ use parser::{PARSING_MODE_DEFAULT, Parse, ParserContext}; use properties::animated_properties::TransitionProperty; #[cfg(feature = "servo")] use servo_config::prefs::PREFS; use shared_lock::StylesheetGuards; -use style_traits::ToCss; +use style_traits::{HasViewportPercentage, ToCss}; use stylesheets::{CssRuleType, Origin, UrlExtraData}; #[cfg(feature = "servo")] use values::Either; -use values::{HasViewportPercentage, computed}; +use values::computed; use cascade_info::CascadeInfo; use rule_tree::StrongRuleNode; use style_adjuster::StyleAdjuster; diff --git a/servo/components/style/values/computed/mod.rs b/servo/components/style/values/computed/mod.rs index 8c537eb36942..94042158c486 100644 --- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -4,6 +4,7 @@ //! Computed values. +use Atom; use context::QuirksMode; use euclid::size::Size2D; use font_metrics::FontMetricsProvider; @@ -154,6 +155,79 @@ pub trait ToComputedValue { fn from_computed_value(computed: &Self::ComputedValue) -> Self; } +impl ToComputedValue for (A, B) + where A: ToComputedValue, B: ToComputedValue, +{ + type ComputedValue = ( + ::ComputedValue, + ::ComputedValue, + ); + + #[inline] + fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { + (self.0.to_computed_value(context), self.1.to_computed_value(context)) + } + + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + (A::from_computed_value(&computed.0), B::from_computed_value(&computed.1)) + } +} + +impl ToComputedValue for Option + where T: ToComputedValue +{ + type ComputedValue = Option<::ComputedValue>; + + #[inline] + fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { + self.as_ref().map(|item| item.to_computed_value(context)) + } + + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + computed.as_ref().map(T::from_computed_value) + } +} + +impl ToComputedValue for Size2D + where T: ToComputedValue +{ + type ComputedValue = Size2D<::ComputedValue>; + + #[inline] + fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { + Size2D::new( + self.width.to_computed_value(context), + self.height.to_computed_value(context), + ) + } + + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + Size2D::new( + T::from_computed_value(&computed.width), + T::from_computed_value(&computed.height), + ) + } +} + +impl ToComputedValue for Vec + where T: ToComputedValue +{ + type ComputedValue = Vec<::ComputedValue>; + + #[inline] + fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { + self.iter().map(|item| item.to_computed_value(context)).collect() + } + + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + computed.iter().map(T::from_computed_value).collect() + } +} + /// A marker trait to represent that the specified value is also the computed /// value. pub trait ComputedValueAsSpecified {} @@ -174,6 +248,9 @@ impl ToComputedValue for T } } +impl ComputedValueAsSpecified for Atom {} +impl ComputedValueAsSpecified for bool {} + /// A computed `` value. #[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, PartialOrd)] #[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] diff --git a/servo/components/style/values/generics/basic_shape.rs b/servo/components/style/values/generics/basic_shape.rs index d961141dbc9c..31f434414f59 100644 --- a/servo/components/style/values/generics/basic_shape.rs +++ b/servo/components/style/values/generics/basic_shape.rs @@ -11,16 +11,15 @@ use parser::{Parse, ParserContext}; use properties::shorthands::serialize_four_sides; use std::ascii::AsciiExt; use std::fmt; -use style_traits::ToCss; -use values::HasViewportPercentage; -use values::computed::{ComputedValueAsSpecified, Context, ToComputedValue}; +use style_traits::{HasViewportPercentage, ToCss}; +use values::computed::ComputedValueAsSpecified; use values::generics::BorderRadiusSize; use values::specified::url::SpecifiedUrl; /// A generic type used for `border-radius`, `outline-radius` and `inset()` values. /// /// https://drafts.csswg.org/css-backgrounds-3/#border-radius -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct BorderRadius { /// The top left radius. @@ -60,32 +59,8 @@ impl ToCss for BorderRadius { } } -impl ToComputedValue for BorderRadius { - type ComputedValue = BorderRadius; - - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - BorderRadius { - top_left: self.top_left.to_computed_value(cx), - top_right: self.top_right.to_computed_value(cx), - bottom_right: self.bottom_right.to_computed_value(cx), - bottom_left: self.bottom_left.to_computed_value(cx), - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - BorderRadius { - top_left: ToComputedValue::from_computed_value(&computed.top_left), - top_right: ToComputedValue::from_computed_value(&computed.top_right), - bottom_right: ToComputedValue::from_computed_value(&computed.bottom_right), - bottom_left: ToComputedValue::from_computed_value(&computed.bottom_left), - } - } -} - /// https://drafts.csswg.org/css-shapes/#typedef-shape-radius -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] pub enum ShapeRadius { @@ -110,28 +85,6 @@ impl ToCss for ShapeRadius { } } -impl ToComputedValue for ShapeRadius { - type ComputedValue = ShapeRadius; - - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - match *self { - ShapeRadius::Length(ref lop) => ShapeRadius::Length(lop.to_computed_value(cx)), - ShapeRadius::ClosestSide => ShapeRadius::ClosestSide, - ShapeRadius::FarthestSide => ShapeRadius::FarthestSide, - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - ShapeRadius::Length(ref lop) => ShapeRadius::Length(ToComputedValue::from_computed_value(lop)), - ShapeRadius::ClosestSide => ShapeRadius::ClosestSide, - ShapeRadius::FarthestSide => ShapeRadius::FarthestSide, - } - } -} - // https://drafts.csswg.org/css-shapes/#typedef-fill-rule // NOTE: Basic shapes spec says that these are the only two values, however // https://www.w3.org/TR/SVG/painting.html#FillRuleProperty @@ -148,7 +101,7 @@ impl Default for FillRule { fn default() -> Self { FillRule::NonZero } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] /// A generic type for representing the `polygon()` function /// @@ -212,32 +165,7 @@ impl ToCss for Polygon { } } -impl ToComputedValue for Polygon { - type ComputedValue = Polygon; - - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - Polygon { - fill: self.fill.to_computed_value(cx), - coordinates: self.coordinates.iter().map(|c| { - (c.0.to_computed_value(cx), c.1.to_computed_value(cx)) - }).collect(), - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - Polygon { - fill: ToComputedValue::from_computed_value(&computed.fill), - coordinates: computed.coordinates.iter().map(|c| { - (ToComputedValue::from_computed_value(&c.0), - ToComputedValue::from_computed_value(&c.1)) - }).collect(), - } - } -} - -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] /// https://drafts.csswg.org/css-shapes/#funcdef-inset #[allow(missing_docs)] @@ -269,37 +197,11 @@ impl ToCss for InsetRect { } } -impl ToComputedValue for InsetRect { - type ComputedValue = InsetRect; - - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - InsetRect { - top: self.top.to_computed_value(cx), - right: self.right.to_computed_value(cx), - bottom: self.bottom.to_computed_value(cx), - left: self.left.to_computed_value(cx), - round: self.round.as_ref().map(|r| r.to_computed_value(cx)), - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - InsetRect { - top: ToComputedValue::from_computed_value(&computed.top), - right: ToComputedValue::from_computed_value(&computed.right), - bottom: ToComputedValue::from_computed_value(&computed.bottom), - left: ToComputedValue::from_computed_value(&computed.left), - round: computed.round.as_ref().map(|r| ToComputedValue::from_computed_value(r)), - } - } -} - /// A shape source, for some reference box /// /// `clip-path` uses ShapeSource, /// `shape-outside` uses ShapeSource -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] pub enum ShapeSource { @@ -365,33 +267,3 @@ impl Parse for ShapeSource { ref_box.map(|v| ShapeSource::Box(v)).ok_or(()) } } - -impl ToComputedValue for ShapeSource { - type ComputedValue = ShapeSource; - - #[inline] - fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue { - match *self { - ShapeSource::Url(ref url) => ShapeSource::Url(url.to_computed_value(cx)), - ShapeSource::Shape(ref shape, ref ref_box) => { - ShapeSource::Shape(shape.to_computed_value(cx), - ref_box.as_ref().map(|ref val| val.to_computed_value(cx))) - }, - ShapeSource::Box(ref ref_box) => ShapeSource::Box(ref_box.to_computed_value(cx)), - ShapeSource::None => ShapeSource::None, - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - ShapeSource::Url(ref url) => ShapeSource::Url(SpecifiedUrl::from_computed_value(url)), - ShapeSource::Shape(ref shape, ref ref_box) => { - ShapeSource::Shape(ToComputedValue::from_computed_value(shape), - ref_box.as_ref().map(|val| ToComputedValue::from_computed_value(val))) - }, - ShapeSource::Box(ref ref_box) => ShapeSource::Box(ToComputedValue::from_computed_value(ref_box)), - ShapeSource::None => ShapeSource::None, - } - } -} diff --git a/servo/components/style/values/generics/image.rs b/servo/components/style/values/generics/image.rs index 2b42314eb007..9aa49428dcec 100644 --- a/servo/components/style/values/generics/image.rs +++ b/servo/components/style/values/generics/image.rs @@ -9,15 +9,14 @@ use Atom; use cssparser::serialize_identifier; use std::fmt; -use style_traits::ToCss; -use values::HasViewportPercentage; -use values::computed::{Context, ToComputedValue}; +use style_traits::{HasViewportPercentage, ToCss}; +use values::computed::ComputedValueAsSpecified; use values::specified::url::SpecifiedUrl; /// An [image]. /// /// [image]: https://drafts.csswg.org/css-images/#image-values -#[derive(Clone, PartialEq)] +#[derive(Clone, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum Image { /// A `` image. @@ -32,7 +31,7 @@ pub enum Image { /// A CSS gradient. /// https://drafts.csswg.org/css-images/#gradients -#[derive(Clone, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct Gradient { /// Gradients can be linear or radial. @@ -45,7 +44,7 @@ pub struct Gradient pub compat_mode: CompatMode, } -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] /// Whether we used the modern notation or the compatibility `-webkit` prefix. pub enum CompatMode { @@ -56,7 +55,7 @@ pub enum CompatMode { } /// A gradient kind. -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum GradientKind { /// A linear gradient. @@ -66,7 +65,7 @@ pub enum GradientKind { } /// A radial gradient's ending shape. -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum EndingShape { /// A circular gradient. @@ -76,7 +75,7 @@ pub enum EndingShape { } /// A circle shape. -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum Circle { /// A circle radius. @@ -86,7 +85,7 @@ pub enum Circle { } /// An ellipse shape. -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum Ellipse { /// An ellipse pair of radii. @@ -105,10 +104,11 @@ define_css_keyword_enum!(ShapeExtent: "cover" => Cover ); no_viewport_percentage!(ShapeExtent); +impl ComputedValueAsSpecified for ShapeExtent {} /// A gradient item. /// https://drafts.csswg.org/css-images-4/#color-stop-syntax -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum GradientItem { /// A color stop. @@ -119,7 +119,7 @@ pub enum GradientItem { /// A color stop. /// https://drafts.csswg.org/css-images/#typedef-color-stop-list -#[derive(Clone, Copy, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct ColorStop { /// The color of this stop. @@ -131,7 +131,7 @@ pub struct ColorStop { /// Values for `moz-image-rect`. /// /// `-moz-image-rect(, top, right, bottom, left);` -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[allow(missing_docs)] pub struct ImageRect { @@ -187,47 +187,6 @@ impl HasViewportPercentage for Image } } -impl ToComputedValue for Image - where G: ToComputedValue, R: ToComputedValue, -{ - type ComputedValue = Image<::ComputedValue, - ::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - match *self { - Image::Url(ref url) => { - Image::Url(url.clone()) - }, - Image::Gradient(ref gradient) => { - Image::Gradient(gradient.to_computed_value(context)) - }, - Image::Rect(ref rect) => { - Image::Rect(rect.to_computed_value(context)) - }, - Image::Element(ref selector) => { - Image::Element(selector.clone()) - } - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - Image::Url(ref url) => { - Image::Url(url.clone()) - }, - Image::Gradient(ref gradient) => { - Image::Gradient(ToComputedValue::from_computed_value(gradient)) - }, - Image::Rect(ref rect) => { - Image::Rect(ToComputedValue::from_computed_value(rect)) - }, - Image::Element(ref selector) => { - Image::Element(selector.clone()) - }, - } - } -} - impl ToCss for Gradient where D: LineDirection, L: ToCss, LoP: ToCss, P: ToCss, C: ToCss, { @@ -282,38 +241,6 @@ impl ToCss for Gradient } } -impl ToComputedValue for Gradient - where D: ToComputedValue, - L: ToComputedValue, - LoP: ToComputedValue, - P: ToComputedValue, - C: ToComputedValue, -{ - type ComputedValue = Gradient<::ComputedValue, - ::ComputedValue, - ::ComputedValue, -

::ComputedValue, - ::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - Gradient { - kind: self.kind.to_computed_value(context), - items: self.items.iter().map(|s| s.to_computed_value(context)).collect(), - repeating: self.repeating, - compat_mode: self.compat_mode, - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - Gradient { - kind: ToComputedValue::from_computed_value(&computed.kind), - items: computed.items.iter().map(ToComputedValue::from_computed_value).collect(), - repeating: computed.repeating, - compat_mode: computed.compat_mode, - } - } -} - impl GradientKind { fn label(&self) -> &str { match *self { @@ -323,43 +250,6 @@ impl GradientKind { } } -impl ToComputedValue for GradientKind - where D: ToComputedValue, - L: ToComputedValue, - LoP: ToComputedValue, - P: ToComputedValue, -{ - type ComputedValue = GradientKind<::ComputedValue, - ::ComputedValue, - ::ComputedValue, -

::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - match *self { - GradientKind::Linear(ref direction) => { - GradientKind::Linear(direction.to_computed_value(context)) - }, - GradientKind::Radial(ref shape, ref position) => { - GradientKind::Radial(shape.to_computed_value(context), position.to_computed_value(context)) - }, - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - GradientKind::Linear(ref direction) => { - GradientKind::Linear(ToComputedValue::from_computed_value(direction)) - }, - GradientKind::Radial(ref shape, ref position) => { - GradientKind::Radial( - ToComputedValue::from_computed_value(shape), - ToComputedValue::from_computed_value(position), - ) - } - } - } -} - /// The direction of a linear gradient. pub trait LineDirection { /// Whether this direction points towards, and thus can be omitted. @@ -398,53 +288,6 @@ impl ToCss for EndingShape } } -impl ToComputedValue for EndingShape - where L: ToComputedValue, LoP: ToComputedValue, -{ - type ComputedValue = EndingShape<::ComputedValue, - ::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - match *self { - EndingShape::Circle(Circle::Radius(ref length)) => { - EndingShape::Circle(Circle::Radius(length.to_computed_value(context))) - }, - EndingShape::Circle(Circle::Extent(extent)) => { - EndingShape::Circle(Circle::Extent(extent)) - }, - EndingShape::Ellipse(Ellipse::Radii(ref x, ref y)) => { - EndingShape::Ellipse(Ellipse::Radii( - x.to_computed_value(context), - y.to_computed_value(context), - )) - }, - EndingShape::Ellipse(Ellipse::Extent(extent)) => { - EndingShape::Ellipse(Ellipse::Extent(extent)) - }, - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - EndingShape::Circle(Circle::Radius(ref length)) => { - EndingShape::Circle(Circle::Radius(ToComputedValue::from_computed_value(length))) - }, - EndingShape::Circle(Circle::Extent(extent)) => { - EndingShape::Circle(Circle::Extent(extent)) - }, - EndingShape::Ellipse(Ellipse::Radii(ref x, ref y)) => { - EndingShape::Ellipse(Ellipse::Radii( - ToComputedValue::from_computed_value(x), - ToComputedValue::from_computed_value(y), - )) - }, - EndingShape::Ellipse(Ellipse::Extent(extent)) => { - EndingShape::Ellipse(Ellipse::Extent(extent)) - }, - } - } -} - impl ToCss for GradientItem where C: ToCss, L: ToCss, { @@ -456,35 +299,6 @@ impl ToCss for GradientItem } } -impl ToComputedValue for GradientItem - where C: ToComputedValue, L: ToComputedValue, -{ - type ComputedValue = GradientItem<::ComputedValue, - ::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - match *self { - GradientItem::ColorStop(ref stop) => { - GradientItem::ColorStop(stop.to_computed_value(context)) - }, - GradientItem::InterpolationHint(ref hint) => { - GradientItem::InterpolationHint(hint.to_computed_value(context)) - }, - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - GradientItem::ColorStop(ref stop) => { - GradientItem::ColorStop(ToComputedValue::from_computed_value(stop)) - }, - GradientItem::InterpolationHint(ref hint) => { - GradientItem::InterpolationHint(ToComputedValue::from_computed_value(hint)) - }, - } - } -} - impl fmt::Debug for ColorStop where C: fmt::Debug, L: fmt::Debug, { @@ -510,27 +324,6 @@ impl ToCss for ColorStop } } -impl ToComputedValue for ColorStop - where C: ToComputedValue, L: ToComputedValue, -{ - type ComputedValue = ColorStop<::ComputedValue, - ::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - ColorStop { - color: self.color.to_computed_value(context), - position: self.position.as_ref().map(|p| p.to_computed_value(context)), - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - ColorStop { - color: ToComputedValue::from_computed_value(&computed.color), - position: computed.position.as_ref().map(ToComputedValue::from_computed_value), - } - } -} - impl ToCss for ImageRect where C: ToCss, { @@ -548,29 +341,3 @@ impl ToCss for ImageRect dest.write_str(")") } } - -impl ToComputedValue for ImageRect - where C: ToComputedValue, -{ - type ComputedValue = ImageRect<::ComputedValue>; - - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - ImageRect { - url: self.url.to_computed_value(context), - top: self.top.to_computed_value(context), - right: self.right.to_computed_value(context), - bottom: self.bottom.to_computed_value(context), - left: self.left.to_computed_value(context), - } - } - - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - ImageRect { - url: ToComputedValue::from_computed_value(&computed.url), - top: ToComputedValue::from_computed_value(&computed.top), - right: ToComputedValue::from_computed_value(&computed.right), - bottom: ToComputedValue::from_computed_value(&computed.bottom), - left: ToComputedValue::from_computed_value(&computed.left), - } - } -} diff --git a/servo/components/style/values/generics/mod.rs b/servo/components/style/values/generics/mod.rs index 9ad4668f4daa..983246b98858 100644 --- a/servo/components/style/values/generics/mod.rs +++ b/servo/components/style/values/generics/mod.rs @@ -10,10 +10,8 @@ use cssparser::Parser; use euclid::size::Size2D; use parser::{Parse, ParserContext}; use std::fmt; -use style_traits::ToCss; +use style_traits::{HasViewportPercentage, ToCss}; use super::CustomIdent; -use super::HasViewportPercentage; -use super::computed::{Context, ToComputedValue}; pub use self::basic_shape::serialize_radius_values; @@ -21,9 +19,9 @@ pub mod basic_shape; pub mod image; pub mod position; -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] -/// A type for representing CSS `widthh` and `height` values. +/// A type for representing CSS `width` and `height` values. pub struct BorderRadiusSize(pub Size2D); impl HasViewportPercentage for BorderRadiusSize { @@ -62,24 +60,6 @@ impl ToCss for BorderRadiusSize { } } -impl ToComputedValue for BorderRadiusSize { - type ComputedValue = BorderRadiusSize; - - #[inline] - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - let w = self.0.width.to_computed_value(context); - let h = self.0.height.to_computed_value(context); - BorderRadiusSize(Size2D::new(w, h)) - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - let w = ToComputedValue::from_computed_value(&computed.0.width); - let h = ToComputedValue::from_computed_value(&computed.0.height); - BorderRadiusSize(Size2D::new(w, h)) - } -} - /// https://drafts.csswg.org/css-counter-styles/#typedef-counter-style /// /// Since wherever is used, 'none' is a valid value as diff --git a/servo/components/style/values/generics/position.rs b/servo/components/style/values/generics/position.rs index 7e13919d30cd..4ce5b63ab304 100644 --- a/servo/components/style/values/generics/position.rs +++ b/servo/components/style/values/generics/position.rs @@ -5,9 +5,7 @@ //! Generic types for CSS handling of specified and computed values of //! [`position`](https://drafts.csswg.org/css-backgrounds-3/#position) -use values::computed::{Context, ToComputedValue}; - -#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)] +#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] /// A generic type for representing a CSS [position](https://drafts.csswg.org/css-values/#position). pub struct Position { @@ -26,24 +24,3 @@ impl Position { } } } - -impl ToComputedValue for Position { - type ComputedValue = Position<::ComputedValue, - ::ComputedValue>; - - #[inline] - fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - Position { - horizontal: self.horizontal.to_computed_value(context), - vertical: self.vertical.to_computed_value(context), - } - } - - #[inline] - fn from_computed_value(computed: &Self::ComputedValue) -> Self { - Self { - horizontal: ToComputedValue::from_computed_value(&computed.horizontal), - vertical: ToComputedValue::from_computed_value(&computed.vertical), - } - } -} diff --git a/servo/components/style/values/mod.rs b/servo/components/style/values/mod.rs index 6a6469a1742c..bbb6603bb90c 100644 --- a/servo/components/style/values/mod.rs +++ b/servo/components/style/values/mod.rs @@ -16,7 +16,6 @@ use std::borrow::Cow; use std::fmt::{self, Debug}; use std::hash; use style_traits::ToCss; -pub use style_traits::HasViewportPercentage; pub mod computed; pub mod generics; diff --git a/servo/components/style/values/specified/calc.rs b/servo/components/style/values/specified/calc.rs index 4db36e998c26..dc6f5cf2f819 100644 --- a/servo/components/style/values/specified/calc.rs +++ b/servo/components/style/values/specified/calc.rs @@ -11,9 +11,9 @@ use cssparser::{Parser, Token}; use parser::ParserContext; use std::ascii::AsciiExt; use std::fmt; -use style_traits::ToCss; +use style_traits::{HasViewportPercentage, ToCss}; use style_traits::values::specified::AllowedLengthType; -use values::{CSSInteger, CSSFloat, HasViewportPercentage}; +use values::{CSSInteger, CSSFloat}; use values::specified::{Angle, Time}; use values::specified::length::{FontRelativeLength, NoCalcLength, ViewportPercentageLength}; diff --git a/servo/components/style/values/specified/grid.rs b/servo/components/style/values/specified/grid.rs index a4a8b930ef86..0633a0b0e807 100644 --- a/servo/components/style/values/specified/grid.rs +++ b/servo/components/style/values/specified/grid.rs @@ -8,8 +8,8 @@ use cssparser::{Parser, Token, serialize_identifier}; use parser::{Parse, ParserContext}; use std::{fmt, mem, usize}; use std::ascii::AsciiExt; -use style_traits::ToCss; -use values::{CSSFloat, CustomIdent, Either, HasViewportPercentage}; +use style_traits::{HasViewportPercentage, ToCss}; +use values::{CSSFloat, CustomIdent, Either}; use values::computed::{self, ComputedValueAsSpecified, Context, ToComputedValue}; use values::specified::{Integer, LengthOrPercentage}; diff --git a/servo/components/style/values/specified/length.rs b/servo/components/style/values/specified/length.rs index 331901bf8c64..830b433b80ce 100644 --- a/servo/components/style/values/specified/length.rs +++ b/servo/components/style/values/specified/length.rs @@ -14,11 +14,11 @@ use parser::{Parse, ParserContext}; use std::{cmp, fmt, mem}; use std::ascii::AsciiExt; use std::ops::Mul; -use style_traits::ToCss; +use style_traits::{HasViewportPercentage, ToCss}; use style_traits::values::specified::{AllowedLengthType, AllowedNumericType}; use stylesheets::CssRuleType; use super::{AllowQuirks, Number, ToComputedValue}; -use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, HasViewportPercentage, None_, Normal}; +use values::{Auto, CSSFloat, Either, FONT_MEDIUM_PX, None_, Normal}; use values::ExtremumLength; use values::computed::{ComputedValueAsSpecified, Context}; use values::specified::calc::CalcNode; diff --git a/servo/components/style/values/specified/position.rs b/servo/components/style/values/specified/position.rs index a4b4953c372c..085fea593006 100644 --- a/servo/components/style/values/specified/position.rs +++ b/servo/components/style/values/specified/position.rs @@ -10,8 +10,7 @@ use cssparser::Parser; use parser::{Parse, ParserContext}; use std::fmt; -use style_traits::ToCss; -use values::HasViewportPercentage; +use style_traits::{HasViewportPercentage, ToCss}; use values::computed::{CalcLengthOrPercentage, LengthOrPercentage as ComputedLengthOrPercentage}; use values::computed::{Context, ToComputedValue}; use values::generics::position::Position as GenericPosition; diff --git a/servo/components/style_derive/lib.rs b/servo/components/style_derive/lib.rs index fd47a962ce9b..7f4743dccd7a 100644 --- a/servo/components/style_derive/lib.rs +++ b/servo/components/style_derive/lib.rs @@ -10,9 +10,16 @@ extern crate synstructure; use proc_macro::TokenStream; mod has_viewport_percentage; +mod to_computed_value; #[proc_macro_derive(HasViewportPercentage)] pub fn derive_has_viewport_percentage(stream: TokenStream) -> TokenStream { let input = syn::parse_derive_input(&stream.to_string()).unwrap(); has_viewport_percentage::derive(input).to_string().parse().unwrap() } + +#[proc_macro_derive(ToComputedValue)] +pub fn derive_to_computed_value(stream: TokenStream) -> TokenStream { + let input = syn::parse_derive_input(&stream.to_string()).unwrap(); + to_computed_value::derive(input).to_string().parse().unwrap() +} diff --git a/servo/components/style_derive/to_computed_value.rs b/servo/components/style_derive/to_computed_value.rs new file mode 100644 index 000000000000..d7c4801dbf8d --- /dev/null +++ b/servo/components/style_derive/to_computed_value.rs @@ -0,0 +1,142 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use quote; +use syn; +use synstructure; + +pub fn derive(input: syn::DeriveInput) -> quote::Tokens { + let name = &input.ident; + let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); + let mut where_clause = where_clause.clone(); + for param in &input.generics.ty_params { + where_clause.predicates.push(where_predicate(syn::Ty::Path(None, param.ident.clone().into()), None)); + } + + let computed_value_type = syn::Path::from(syn::PathSegment { + ident: name.clone(), + parameters: syn::PathParameters::AngleBracketed(syn::AngleBracketedParameterData { + lifetimes: input.generics.lifetimes.iter().map(|l| { + l.lifetime.clone() + }).collect(), + types: input.generics.ty_params.iter().map(|ty| { + syn::Ty::Path( + Some(syn::QSelf { + ty: Box::new(syn::Ty::Path(None, ty.ident.clone().into())), + position: 3, + }), + syn::Path { + global: true, + segments: vec![ + "values".into(), + "computed".into(), + "ToComputedValue".into(), + "ComputedValue".into(), + ], + }, + ) + }).collect(), + .. Default::default() + }), + }); + + let to_body = match_body(&input, |field| { + quote!(::values::computed::ToComputedValue::to_computed_value(#field, context)) + }); + let from_body = match_body(&input, |field| { + quote!(::values::computed::ToComputedValue::from_computed_value(#field)) + }); + + quote! { + impl #impl_generics ::values::computed::ToComputedValue for #name #ty_generics #where_clause { + type ComputedValue = #computed_value_type; + + #[allow(unused_variables)] + #[inline] + fn to_computed_value(&self, context: &::values::computed::Context) -> Self::ComputedValue { + match *self { + #to_body + } + } + + #[inline] + fn from_computed_value(computed: &Self::ComputedValue) -> Self { + match *computed { + #from_body + } + } + } + } +} + +fn match_body(input: &syn::DeriveInput, f: F) -> quote::Tokens + where F: Fn(&synstructure::BindingInfo) -> quote::Tokens, +{ + let by_ref = synstructure::BindStyle::Ref.into(); + let by_value = synstructure::BindStyle::Move.into(); + + synstructure::each_variant(&input, &by_ref, |fields, variant| { + let name = if let syn::Body::Enum(_) = input.body { + format!("{}::{}", input.ident, variant.ident).into() + } else { + variant.ident.clone() + }; + let (computed_value, computed_fields) = synstructure::match_pattern(&name, &variant.data, &by_value); + let fields_pairs = fields.iter().zip(computed_fields.iter()); + let mut computations = quote!(); + computations.append_all(fields_pairs.map(|(field, computed_field)| { + let expr = f(field); + quote!(let #computed_field = #expr;) + })); + Some(quote!( + #computations + #computed_value + )) + }) +} + +/// `#ty: ::values::computed::ToComputedValue` +fn where_predicate(ty: syn::Ty, computed_value: Option) -> syn::WherePredicate { + syn::WherePredicate::BoundPredicate(syn::WhereBoundPredicate { + bound_lifetimes: vec![], + bounded_ty: ty, + bounds: vec![syn::TyParamBound::Trait( + syn::PolyTraitRef { + bound_lifetimes: vec![], + trait_ref: trait_ref(computed_value), + }, + syn::TraitBoundModifier::None + )], + }) +} + +/// `::values::computed::ToComputedValue` +fn trait_ref(computed_value: Option) -> syn::Path { + syn::Path { + global: true, + segments: vec![ + "values".into(), + "computed".into(), + syn::PathSegment { + ident: "ToComputedValue".into(), + parameters: syn::PathParameters::AngleBracketed( + syn::AngleBracketedParameterData { + bindings: trait_bindings(computed_value), + .. Default::default() + } + ), + } + ], + } +} + +/// `ComputedValue = #computed_value,` +fn trait_bindings(computed_value: Option) -> Vec { + computed_value.into_iter().map(|ty| { + syn::TypeBinding { + ident: "ComputedValue".into(), + ty: ty, + } + }).collect() +} diff --git a/servo/tests/unit/style/parsing/value.rs b/servo/tests/unit/style/parsing/value.rs index 3a1f69746e45..5808f875747c 100644 --- a/servo/tests/unit/style/parsing/value.rs +++ b/servo/tests/unit/style/parsing/value.rs @@ -8,8 +8,8 @@ use media_queries::CSSErrorReporterTest; use style::context::QuirksMode; use style::parser::{PARSING_MODE_ALLOW_ALL_NUMERIC_VALUES, ParserContext}; use style::stylesheets::{CssRuleType, Origin}; -use style::values::HasViewportPercentage; use style::values::specified::{AbsoluteLength, NoCalcLength, Number, ViewportPercentageLength}; +use style_traits::HasViewportPercentage; #[test] fn length_has_viewport_percentage() { diff --git a/servo/tests/unit/style/properties/viewport.rs b/servo/tests/unit/style/properties/viewport.rs index 4444e19e0236..ce4f879224e1 100644 --- a/servo/tests/unit/style/properties/viewport.rs +++ b/servo/tests/unit/style/properties/viewport.rs @@ -5,8 +5,8 @@ use app_units::Au; use style::properties::PropertyDeclaration; use style::properties::longhands::border_top_width; -use style::values::HasViewportPercentage; use style::values::specified::{AbsoluteLength, Length, NoCalcLength, ViewportPercentageLength}; +use style_traits::HasViewportPercentage; #[test] fn has_viewport_percentage_for_specified_value() { From 4886a7a2bba136e5afc2668454c6a0692fd79449 Mon Sep 17 00:00:00 2001 From: Julian_Chu Date: Thu, 18 May 2017 16:38:01 +0800 Subject: [PATCH 05/35] Bug 1357781 - Enable function of edit site settings in SiteIdentity r=sebastian The SiteIdentityPopup has a clickable-text to show a dialog to edit permission for the browsring-site. Its visibility is decided by message from EventDispatcher("Permission:CheckResult"). Now register listener by visibility of ActionBar.(or Activity, actually). MozReview-Commit-ID: CUU1gCKqh02 --HG-- extra : rebase_source : d5efe854a544a0529abe3030ba73fea2bcce0c2d --- .../gecko/customtabs/ActionBarPresenter.java | 16 ++++++++++++++++ .../gecko/customtabs/CustomTabsActivity.java | 2 ++ .../mozilla/gecko/toolbar/SiteIdentityPopup.java | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java b/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java index ea3815de2349..4ba49e96373f 100644 --- a/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java +++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/ActionBarPresenter.java @@ -86,6 +86,22 @@ public class ActionBarPresenter { initIndicator(); } + /** + * Called when ActionBar is to start interacting with user. Usually this method is called from + * Activity.onResume. + */ + public void onResume() { + mIdentityPopup.registerListeners(); + } + + /** + * Called when ActionBar is going to background, but has not yet been killed. Usually this method + * is called from Activity.onPause. + */ + public void onPause() { + mIdentityPopup.unregisterListeners(); + } + /** * To display Url in CustomView only and immediately. * diff --git a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java index d4606936469b..ce53b055bf50 100644 --- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java +++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java @@ -231,12 +231,14 @@ public class CustomTabsActivity extends SingleTabActivity implements Tabs.OnTabs public void onResume() { super.onResume(); mLayerView.getDynamicToolbarAnimator().setPinned(true, PinReason.CUSTOM_TAB); + actionBarPresenter.onResume(); } @Override public void onPause() { super.onPause(); mLayerView.getDynamicToolbarAnimator().setPinned(false, PinReason.CUSTOM_TAB); + actionBarPresenter.onPause(); } // Usually should use onCreateOptionsMenu() to initialize menu items. But GeckoApp overwrite diff --git a/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java b/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java index a3ee377c71be..97f61aa76412 100644 --- a/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java +++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java @@ -97,7 +97,7 @@ public class SiteIdentityPopup extends AnchoredPopup implements BundleEventListe mContentButtonClickListener = new ContentNotificationButtonListener(); } - void registerListeners() { + public void registerListeners() { EventDispatcher.getInstance().registerUiThreadListener(this, "Doorhanger:Logins", "Permissions:CheckResult"); @@ -540,7 +540,7 @@ public class SiteIdentityPopup extends AnchoredPopup implements BundleEventListe void destroy() { } - void unregisterListeners() { + public void unregisterListeners() { EventDispatcher.getInstance().unregisterUiThreadListener(this, "Doorhanger:Logins", "Permissions:CheckResult"); From 665da784522fbd6534690d460118cd9f83ece145 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 21 May 2017 08:16:26 +0900 Subject: [PATCH 06/35] Bug 1364799 - Add PostRestyleEventForCSSRuleChanges to distinguish PostRestyleEvent. r=birtles,heycam The difference is that PostRestyleEventForCSSRuleChanges sets mRestyleForCSSRuleChanges true. In a subsequent patch, we propagate a new TraversalRestyleBehavior flag to servo side if mRestyleForCSSRuleChanges is true. MozReview-Commit-ID: IKsBbm09uT9 --HG-- extra : rebase_source : 5014c0a978f98e81543ec7766d2daa415317069c --- layout/base/GeckoRestyleManager.h | 6 ++++++ layout/base/PresShell.cpp | 10 ++++++---- layout/base/RestyleManager.h | 3 +++ layout/base/RestyleManagerInlines.h | 9 +++++++++ layout/base/ServoRestyleManager.cpp | 12 ++++++++++++ layout/base/ServoRestyleManager.h | 11 +++++++++++ 6 files changed, 47 insertions(+), 4 deletions(-) diff --git a/layout/base/GeckoRestyleManager.h b/layout/base/GeckoRestyleManager.h index df54fcc8fd4d..dbb5306bb38a 100644 --- a/layout/base/GeckoRestyleManager.h +++ b/layout/base/GeckoRestyleManager.h @@ -273,6 +273,12 @@ public: nsChangeHint aMinChangeHint, const RestyleHintData* aRestyleHintData = nullptr); + void PostRestyleEventForCSSRuleChanges(Element* aElement, + nsRestyleHint aRestyleHint, + nsChangeHint aMinChangeHint) { + PostRestyleEvent(aElement, aRestyleHint, aMinChangeHint); + } + public: /** * Asynchronously clear style data from the root frame downwards and ensure diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 6b9c733633a7..f37694493e1a 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -4584,12 +4584,14 @@ nsIPresShell::RestyleForCSSRuleChanges() // If scopeRoots is empty, we know that mStylesHaveChanged was true at // the beginning of this function, and that we need to restyle the whole // document. - restyleManager->PostRestyleEvent(root, eRestyle_Subtree, - nsChangeHint(0)); + restyleManager->PostRestyleEventForCSSRuleChanges(root, + eRestyle_Subtree, + nsChangeHint(0)); } else { for (Element* scopeRoot : scopeRoots) { - restyleManager->PostRestyleEvent(scopeRoot, eRestyle_Subtree, - nsChangeHint(0)); + restyleManager->PostRestyleEventForCSSRuleChanges(scopeRoot, + eRestyle_Subtree, + nsChangeHint(0)); } } } diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 196c9451e86c..46575f92f7a8 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -161,6 +161,9 @@ public: inline void PostRestyleEvent(dom::Element* aElement, nsRestyleHint aRestyleHint, nsChangeHint aMinChangeHint); + inline void PostRestyleEventForCSSRuleChanges(dom::Element* aElement, + nsRestyleHint aRestyleHint, + nsChangeHint aMinChangeHint); inline void RebuildAllStyleData(nsChangeHint aExtraHint, nsRestyleHint aRestyleHint); inline void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint, diff --git a/layout/base/RestyleManagerInlines.h b/layout/base/RestyleManagerInlines.h index 6e2e70e58469..1c0ee9760032 100644 --- a/layout/base/RestyleManagerInlines.h +++ b/layout/base/RestyleManagerInlines.h @@ -24,6 +24,15 @@ RestyleManager::PostRestyleEvent(dom::Element* aElement, MOZ_STYLO_FORWARD(PostRestyleEvent, (aElement, aRestyleHint, aMinChangeHint)); } +void +RestyleManager::PostRestyleEventForCSSRuleChanges(dom::Element* aElement, + nsRestyleHint aRestyleHint, + nsChangeHint aMinChangeHint) +{ + MOZ_STYLO_FORWARD(PostRestyleEventForCSSRuleChanges, + (aElement, aRestyleHint, aMinChangeHint)); +} + void RestyleManager::RebuildAllStyleData(nsChangeHint aExtraHint, nsRestyleHint aRestyleHint) diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index c0f5f3d6dfef..cf366a277205 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -66,6 +66,17 @@ ServoRestyleManager::PostRestyleEvent(Element* aElement, Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint); } +void +ServoRestyleManager::PostRestyleEventForCSSRuleChanges( + Element* aElement, + nsRestyleHint aRestyleHint, + nsChangeHint aMinChangeHint) +{ + mRestyleForCSSRuleChanges = true; + + PostRestyleEvent(aElement, aRestyleHint, aMinChangeHint); +} + /* static */ void ServoRestyleManager::PostRestyleEventForAnimations(Element* aElement, nsRestyleHint aRestyleHint) @@ -603,6 +614,7 @@ ServoRestyleManager::DoProcessPendingRestyles(TraversalRestyleBehavior styleSet->AssertTreeIsClean(); mHaveNonAnimationRestyles = false; } + mRestyleForCSSRuleChanges = false; mInStyleRefresh = false; // Note: We are in the scope of |animationsWithDestroyedFrame|, so diff --git a/layout/base/ServoRestyleManager.h b/layout/base/ServoRestyleManager.h index acd3fb02be0f..5da230f44134 100644 --- a/layout/base/ServoRestyleManager.h +++ b/layout/base/ServoRestyleManager.h @@ -44,6 +44,9 @@ public: nsRestyleHint aRestyleHint, nsChangeHint aMinChangeHint); void PostRestyleEventForLazyConstruction(); + void PostRestyleEventForCSSRuleChanges(dom::Element* aElement, + nsRestyleHint aRestyleHint, + nsChangeHint aMinChangeHint); void RebuildAllStyleData(nsChangeHint aExtraHint, nsRestyleHint aRestyleHint); void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint, @@ -162,6 +165,14 @@ private: // creation sequence will be correct. bool mHaveNonAnimationRestyles = false; + // Set to true when posting restyle events triggered by CSS rule changes. + // This flag is cleared once ProcessPendingRestyles has completed. + // When we process a traversal all descendants elements of the document + // triggered by CSS rule changes, we will need to update all elements with + // CSS animations. We propagate TraversalRestyleBehavior::ForCSSRuleChanges + // to traversal function if this flag is set. + bool mRestyleForCSSRuleChanges = false; + // A hashtable with the elements that have changed state or attributes, in // order to calculate restyle hints during the traversal. SnapshotTable mSnapshots; From 49bc653390a79f3942ddf2523bdd5263abe0174c Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 21 May 2017 08:16:26 +0900 Subject: [PATCH 07/35] Bug 1364799 - Add a new TraversalRestyleBehavior that represents the traversal is triggered by CSS rule changes. r=birtles And propagate the new flag to servo if mRestyleForCSSRuleChanges is set. MozReview-Commit-ID: HRZ5duYgciF --HG-- extra : rebase_source : 65528ea0dfa21e84bb9184a849c72a5c322e306b --- layout/base/ServoRestyleManager.cpp | 5 ++++- layout/base/nsCSSFrameConstructor.cpp | 2 +- layout/style/ServoStyleSet.cpp | 10 ++++++++-- layout/style/ServoStyleSet.h | 7 ++++++- layout/style/ServoTypes.h | 8 ++++++++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index cf366a277205..004d34ee4e17 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -564,8 +564,11 @@ ServoRestyleManager::DoProcessPendingRestyles(TraversalRestyleBehavior ++mAnimationGeneration; } + TraversalRestyleBehavior restyleBehavior = mRestyleForCSSRuleChanges + ? TraversalRestyleBehavior::ForCSSRuleChanges + : TraversalRestyleBehavior::Normal; while (animationOnly ? styleSet->StyleDocumentForAnimationOnly() - : styleSet->StyleDocument()) { + : styleSet->StyleDocument(restyleBehavior)) { if (!animationOnly) { ClearSnapshots(); } diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index f7f238d42b14..c092b79ad74d 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2537,7 +2537,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle // We delay traversing the entire document until here, since we per above we // may invalidate the root style when we load doc stylesheets. if (ServoStyleSet* set = mPresShell->StyleSet()->GetAsServo()) { - set->StyleDocument(); + set->StyleDocument(TraversalRestyleBehavior::Normal); } // --------- IF SCROLLABLE WRAP IN SCROLLFRAME -------- diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 3eb9f478fa0a..a5e166b5360b 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -825,8 +825,14 @@ ServoStyleSet::HasStateDependentStyle(dom::Element* aElement, } bool -ServoStyleSet::StyleDocument() +ServoStyleSet::StyleDocument(TraversalRestyleBehavior aRestyleBehavior) { + MOZ_ASSERT( + aRestyleBehavior == TraversalRestyleBehavior::Normal || + aRestyleBehavior == TraversalRestyleBehavior::ForCSSRuleChanges, + "StyleDocument() should be only called for normal traversal or CSS rule " + "changes"); + PreTraverse(); // Restyle the document from the root element and each of the document level @@ -836,7 +842,7 @@ ServoStyleSet::StyleDocument() while (Element* root = iter.GetNextStyleRoot()) { if (PrepareAndTraverseSubtree(root, TraversalRootBehavior::Normal, - TraversalRestyleBehavior::Normal)) { + aRestyleBehavior)) { postTraversalRequired = true; } } diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index 33b73ab79b84..5cbaba1a5634 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -230,9 +230,14 @@ public: * This will traverse all of the document's style roots (that is, its document * element, and the roots of the document-level native anonymous content). * + * |aRestyleBehavior| should be `Normal` or `ForCSSRuleChanges`. + * We need to specify |ForCSSRuleChanges| to try to update all CSS animations + * when we call this function due to CSS rule changes since @keyframes rules + * may have changed. + * * Returns true if a post-traversal is required. */ - bool StyleDocument(); + bool StyleDocument(TraversalRestyleBehavior aRestyleBehavior); /** * Performs a Servo animation-only traversal to compute style for all nodes diff --git a/layout/style/ServoTypes.h b/layout/style/ServoTypes.h index 48367e8115f2..ed10098a30ca 100644 --- a/layout/style/ServoTypes.h +++ b/layout/style/ServoTypes.h @@ -59,10 +59,18 @@ enum class TraversalRootBehavior { // hints, which is what's required when handling frame reconstruction. // The change hints in this case are unneeded, since the old frames have // already been destroyed. +// Indicates how the Servo style system should perform. enum class TraversalRestyleBehavior { + // Normal processing. Normal, + // Traverses in a mode that doesn't generate any change hints, which is what's + // required when handling frame reconstruction. The change hints in this case + // are unneeded, since the old frames have already been destroyed. ForReconstruct, + // Processes animation-only restyle. ForAnimationOnly, + // Traverses as normal mode but tries to update all CSS animations. + ForCSSRuleChanges, }; // Represents which tasks are performed in a SequentialTask of UpdateAnimations. From a1dea29db68825e7b00958edae324e04aa2a3e6c Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sun, 21 May 2017 09:23:31 +0900 Subject: [PATCH 08/35] Bug 1364799 - Update mochitest expectations. r=birtles MozReview-Commit-ID: L15LcySUijd --HG-- extra : rebase_source : 7d87717fd4caa4d2c7b2711b02cf0d6fd608d753 --- layout/style/test/stylo-failures.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/layout/style/test/stylo-failures.md b/layout/style/test/stylo-failures.md index 06fe8de9c6d3..a49bb5b5624b 100644 --- a/layout/style/test/stylo-failures.md +++ b/layout/style/test/stylo-failures.md @@ -36,13 +36,11 @@ to mochitest command. * test_webkit_device_pixel_ratio.html: -webkit-device-pixel-ratio [3] * browser_bug453896.js [8] * Animation support: - * test_animations.html [3] + * test_animations.html [1] * test_animations_dynamic_changes.html [1] * test_bug716226.html [3] - * inserting keyframes rule doesn't trigger restyle bug 1364799: - * test_rule_insertion.html `@keyframes` [36] * OMTA - * test_animations_omta.html: bug 1361938, bug 1361663 [88] + * test_animations_omta.html: bug 1361938, bug 1361663 [85] * SMIL Animation * test_restyles_in_smil_animation.html [2] * CSSOM support: From 4df8cc5fe84cd30d7f11004705291b208b335171 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 19 May 2017 23:24:31 +1000 Subject: [PATCH 09/35] Bug 1366247 - Add sugar for already_AddRefed and use it for conversion between Atom and nsIAtom pointer. r=manishearth MozReview-Commit-ID: HeV5UsqGcWs --HG-- extra : rebase_source : af448460bd6b1dc423db6b296193c189eff461cd --- layout/style/ServoBindingList.h | 4 ++-- layout/style/ServoBindings.cpp | 5 +++-- layout/style/ServoBindings.h | 3 +-- layout/style/ServoBindings.toml | 3 ++- layout/style/ServoKeyframesRule.cpp | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 1d1c7e116330..151b42ec6778 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -153,9 +153,9 @@ SERVO_BINDING_FUNC(Servo_Keyframe_SetStyle, void, RawServoDeclarationBlockBorrowed declarations) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetName, nsIAtom*, RawServoKeyframesRuleBorrowed rule) -// This method takes an addrefed nsIAtom. SERVO_BINDING_FUNC(Servo_KeyframesRule_SetName, void, - RawServoKeyframesRuleBorrowed rule, nsIAtom* name) + RawServoKeyframesRuleBorrowed rule, + already_AddRefed name) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetCount, uint32_t, RawServoKeyframesRuleBorrowed rule) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetKeyframe, RawServoKeyframeStrong, diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index defef6408591..ac8971bec59b 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -1849,9 +1849,10 @@ Gecko_CSSValue_SetStringFromAtom(nsCSSValueBorrowedMut aCSSValue, } void -Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut aCSSValue, nsIAtom* aAtom) +Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut aCSSValue, + already_AddRefed aAtom) { - aCSSValue->SetAtomIdentValue(already_AddRefed(aAtom)); + aCSSValue->SetAtomIdentValue(Move(aAtom)); } void diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index f866b2d60ffa..45fb8fa27ce5 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -476,8 +476,7 @@ void Gecko_CSSValue_SetString(nsCSSValueBorrowedMut css_value, const uint8_t* string, uint32_t len, nsCSSUnit unit); void Gecko_CSSValue_SetStringFromAtom(nsCSSValueBorrowedMut css_value, nsIAtom* atom, nsCSSUnit unit); -// Take an addrefed nsIAtom and set it to the nsCSSValue -void Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut css_value, nsIAtom* atom); +void Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut css_value, already_AddRefed atom); void Gecko_CSSValue_SetArray(nsCSSValueBorrowedMut css_value, int32_t len); void Gecko_CSSValue_SetURL(nsCSSValueBorrowedMut css_value, ServoBundledURI uri); void Gecko_CSSValue_SetInt(nsCSSValueBorrowedMut css_value, int32_t integer, nsCSSUnit unit); diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index 30caf64c8453..03d0e71cd104 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -304,7 +304,6 @@ hide-types = [ ] raw-lines = [ "pub use nsstring::{nsACString, nsAString, nsString, nsStringRepr};", - "use gecko_bindings::structs::nsTArray;", "type nsACString_internal = nsACString;", "type nsAString_internal = nsAString;", ] @@ -314,6 +313,7 @@ structs-types = [ "mozilla::css::ImageValue", "mozilla::css::URLValue", "mozilla::Side", + "already_AddRefed", "RawGeckoAnimationPropertySegment", "RawGeckoComputedTiming", "RawGeckoCSSPropertyIDList", @@ -410,6 +410,7 @@ structs-types = [ "nsStyleVariables", "nsStyleVisibility", "nsStyleXUL", + "nsTArray", "nsTimingFunction", "nscolor", "nscoord", diff --git a/layout/style/ServoKeyframesRule.cpp b/layout/style/ServoKeyframesRule.cpp index 05b123d66ced..990729efc9d5 100644 --- a/layout/style/ServoKeyframesRule.cpp +++ b/layout/style/ServoKeyframesRule.cpp @@ -261,7 +261,7 @@ ServoKeyframesRule::SetName(const nsAString& aName) } UpdateRule([this, &name]() { - Servo_KeyframesRule_SetName(mRawRule, name.forget().take()); + Servo_KeyframesRule_SetName(mRawRule, name.forget()); }); return NS_OK; } From c9a6e119b0439c86fe860656c2ae3753fb9d122d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2017 15:06:27 +0200 Subject: [PATCH 10/35] Bug 1365629: minor cleanup in ServoCSSParsingEnvironment code. r=canaltinova At first I thought that the problem was related to this bug, so I wrote this. I think it's worth landing. MozReview-Commit-ID: G6UKp5l5STm --HG-- extra : rebase_source : 576c2add36e822d3adf281d91cde44303aa5c051 --- layout/style/nsDOMCSSAttrDeclaration.cpp | 7 ++++--- layout/style/nsDOMCSSDeclaration.cpp | 16 ++++++++++------ layout/style/nsDOMCSSDeclaration.h | 10 +++++++--- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/layout/style/nsDOMCSSAttrDeclaration.cpp b/layout/style/nsDOMCSSAttrDeclaration.cpp index 2b3a97b55968..b1481f92d789 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.cpp +++ b/layout/style/nsDOMCSSAttrDeclaration.cpp @@ -176,9 +176,10 @@ nsDOMCSSAttributeDeclaration::GetCSSParsingEnvironment(CSSParsingEnvironment& aC nsDOMCSSDeclaration::ServoCSSParsingEnvironment nsDOMCSSAttributeDeclaration::GetServoCSSParsingEnvironment() const { - ServoCSSParsingEnvironment parsingEnv(mElement->GetURLDataForStyleAttr(), - mElement->OwnerDoc()->GetCompatibilityMode()); - return parsingEnv; + return { + mElement->GetURLDataForStyleAttr(), + mElement->OwnerDoc()->GetCompatibilityMode(), + }; } NS_IMETHODIMP diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp index a99200667ee3..e130b9cc95c0 100644 --- a/layout/style/nsDOMCSSDeclaration.cpp +++ b/layout/style/nsDOMCSSDeclaration.cpp @@ -285,16 +285,20 @@ nsDOMCSSDeclaration::GetServoCSSParsingEnvironmentForRule(const css::Rule* aRule { StyleSheet* sheet = aRule ? aRule->GetStyleSheet() : nullptr; if (!sheet) { - return ServoCSSParsingEnvironment(nullptr, eCompatibility_FullStandards); + return { nullptr, eCompatibility_FullStandards }; } if (nsIDocument* document = aRule->GetDocument()) { - return ServoCSSParsingEnvironment(sheet->AsServo()->URLData(), - document->GetCompatibilityMode()); - } else { - return ServoCSSParsingEnvironment(sheet->AsServo()->URLData(), - eCompatibility_FullStandards); + return { + sheet->AsServo()->URLData(), + document->GetCompatibilityMode(), + }; } + + return { + sheet->AsServo()->URLData(), + eCompatibility_FullStandards, + }; } template diff --git a/layout/style/nsDOMCSSDeclaration.h b/layout/style/nsDOMCSSDeclaration.h index 73e0849b4e91..0c7ff3d392cf 100644 --- a/layout/style/nsDOMCSSDeclaration.h +++ b/layout/style/nsDOMCSSDeclaration.h @@ -149,12 +149,16 @@ protected: }; // Information neded to parse a declaration for Servo side. - struct MOZ_STACK_CLASS ServoCSSParsingEnvironment { + struct MOZ_STACK_CLASS ServoCSSParsingEnvironment + { mozilla::URLExtraData* mUrlExtraData; nsCompatibility mCompatMode; - ServoCSSParsingEnvironment(mozilla::URLExtraData* aUrlData, nsCompatibility aCompatMode) - : mUrlExtraData(aUrlData), mCompatMode(aCompatMode) {} + ServoCSSParsingEnvironment(mozilla::URLExtraData* aUrlData, + nsCompatibility aCompatMode) + : mUrlExtraData(aUrlData) + , mCompatMode(aCompatMode) + {} }; // On failure, mPrincipal should be set to null in aCSSParseEnv. From 8fd765a798ab7a58d7d3cb5beb4a690de14f87c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2017 10:36:54 -0500 Subject: [PATCH 11/35] servo: Merge #16984 - Bug 1365629: Respect parsing mode in LengthOrPercentage. r=canaltinova (from emilio:lop-parsing-mode); r=canaltinova Source-Repo: https://github.com/servo/servo Source-Revision: 0566c601570bc5367db0b9696cb3616405c6a8ca --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 020e94bd21f94e996a6c2cd012f459635645a8fa --- .../components/style/values/specified/length.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/servo/components/style/values/specified/length.rs b/servo/components/style/values/specified/length.rs index 830b433b80ce..56b1d903d9af 100644 --- a/servo/components/style/values/specified/length.rs +++ b/servo/components/style/values/specified/length.rs @@ -620,7 +620,8 @@ impl Length { Token::Dimension(ref value, ref unit) if num_context.is_ok(value.value) => Length::parse_dimension(context, value.value, unit), Token::Number(ref value) if num_context.is_ok(value.value) => { - if value.value != 0. && !context.parsing_mode.allows_unitless_lengths() && + if value.value != 0. && + !context.parsing_mode.allows_unitless_lengths() && !allow_quirks.allowed(context.quirks_mode) { return Err(()) } @@ -805,9 +806,14 @@ impl LengthOrPercentage { NoCalcLength::parse_dimension(context, value.value, unit).map(LengthOrPercentage::Length), Token::Percentage(ref value) if num_context.is_ok(value.unit_value) => Ok(LengthOrPercentage::Percentage(Percentage(value.unit_value))), - Token::Number(value) if value.value == 0. || - (num_context.is_ok(value.value) && allow_quirks.allowed(context.quirks_mode)) => - Ok(LengthOrPercentage::Length(NoCalcLength::from_px(value.value))), + Token::Number(value) if num_context.is_ok(value.value) => { + if value.value != 0. && + !context.parsing_mode.allows_unitless_lengths() && + !allow_quirks.allowed(context.quirks_mode) { + return Err(()) + } + Ok(LengthOrPercentage::Length(NoCalcLength::from_px(value.value))) + } Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => { let calc = try!(input.parse_nested_block(|i| { CalcNode::parse_length_or_percentage(context, i, num_context) @@ -942,7 +948,8 @@ impl LengthOrPercentageOrAuto { Token::Percentage(ref value) if num_context.is_ok(value.unit_value) => Ok(LengthOrPercentageOrAuto::Percentage(Percentage(value.unit_value))), Token::Number(ref value) if num_context.is_ok(value.value) => { - if value.value != 0. && !context.parsing_mode.allows_unitless_lengths() && + if value.value != 0. && + !context.parsing_mode.allows_unitless_lengths() && !allow_quirks.allowed(context.quirks_mode) { return Err(()) } From b916539e926b027b73a9e74659e75e7a041bb171 Mon Sep 17 00:00:00 2001 From: Tomislav Jovanovic Date: Sun, 21 May 2017 17:30:28 +0200 Subject: [PATCH 12/35] Bug 1362047 - Add comment explaining unobvous uses of mockAppInfo() r=kmag MozReview-Commit-ID: 1ZSFXrmGS00 --HG-- extra : rebase_source : dcc4f69b3250fc9f42f991234b2bdb63939f0c15 --- .../extensions/test/xpcshell/test_ext_contentscript.js | 2 ++ .../extensions/test/xpcshell/test_ext_contentscript_xrays.js | 2 ++ toolkit/components/extensions/test/xpcshell/test_ext_i18n.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js index 4886c61a5e37..c005c36222cc 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript.js @@ -5,6 +5,8 @@ server.registerDirectory("/data/", do_get_file("data")); const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`; +// ExtensionContent.jsm needs to know when it's running from xpcshell, +// to use the right timeout for content scripts executed at document_idle. ExtensionTestUtils.mockAppInfo(); add_task(async function test_contentscript_runAt() { diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js index 42060a574a8b..40511d6a50cb 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_xrays.js @@ -2,6 +2,8 @@ Cu.import("resource://gre/modules/Preferences.jsm"); +// ExtensionContent.jsm needs to know when it's running from xpcshell, +// to use the right timeout for content scripts executed at document_idle. ExtensionTestUtils.mockAppInfo(); const server = createHttpServer(); diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js b/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js index d6efdce9533b..6498b8212bb6 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_i18n.js @@ -2,6 +2,8 @@ Cu.import("resource://gre/modules/Preferences.jsm"); +// ExtensionContent.jsm needs to know when it's running from xpcshell, +// to use the right timeout for content scripts executed at document_idle. ExtensionTestUtils.mockAppInfo(); const server = createHttpServer(); From 97aa5cb71edb54fe5892e2e895a4b0cd456e9c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2017 19:16:55 +0200 Subject: [PATCH 13/35] Bug 1365629: Update reftest expectations. r=me MozReview-Commit-ID: H50RqwLL4fs --- layout/reftests/svg/reftest.list | 46 ++++++++++----------- layout/reftests/svg/smil/style/reftest.list | 12 +++--- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index a10782abd10e..3db0c14fe5d3 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -157,16 +157,16 @@ fuzzy-if(d2d&&layersGPUAccelerated,3,1200) == dynamic-rect-02.svg dynamic-rect-0 == dynamic-stroke-opacity-01.svg pass.svg == dynamic-stroke-width-01.svg pass.svg == dynamic-switch-01.svg pass.svg -fails-if(stylo) == dynamic-text-01.svg dynamic-text-01-ref.svg -fuzzy-if(d2d&&layersGPUAccelerated,3,12739) fails-if(stylo) == dynamic-text-02.svg dynamic-text-02-ref.svg # bug 776038 for Win7, Win8 -fuzzy-if(d2d&&layersGPUAccelerated,2,10539) fails-if(stylo) == dynamic-text-03.svg dynamic-text-03-ref.svg # bug 776038 for Win7 -fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),47,89) fails-if(stylo) == dynamic-text-04.svg dynamic-text-04-ref.svg # bug 776038 for Win7 +== dynamic-text-01.svg dynamic-text-01-ref.svg +fuzzy-if(d2d&&layersGPUAccelerated,3,12739) == dynamic-text-02.svg dynamic-text-02-ref.svg # bug 776038 for Win7, Win8 +fuzzy-if(d2d&&layersGPUAccelerated,2,10539) == dynamic-text-03.svg dynamic-text-03-ref.svg # bug 776038 for Win7 +fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),47,89) == dynamic-text-04.svg dynamic-text-04-ref.svg # bug 776038 for Win7 == dynamic-text-05.svg pass.svg == dynamic-text-06.svg pass.svg -fails-if(stylo) == dynamic-text-07.svg dynamic-text-07-ref.svg -fails-if(stylo) == dynamic-text-08.svg dynamic-text-08-ref.svg +== dynamic-text-07.svg dynamic-text-07-ref.svg +== dynamic-text-08.svg dynamic-text-08-ref.svg == dynamic-text-attr-01.svg dynamic-text-attr-01-ref.svg -fails-if(stylo) == dynamic-textPath-01.svg dynamic-textPath-01-ref.svg +== dynamic-textPath-01.svg dynamic-textPath-01-ref.svg == dynamic-textPath-02.svg dynamic-textPath-02-ref.svg == dynamic-textPath-03.svg dynamic-textPath-03-ref.svg == dynamic-use-01.svg pass.svg @@ -188,7 +188,7 @@ random == dynamic-use-nested-01b.svg dynamic-use-nested-01-ref.svg == fallback-color-02a.svg fallback-color-02-ref.svg == fallback-color-02b.svg fallback-color-02-ref.svg == fallback-color-03.svg pass.svg -fuzzy-if(skiaContent,1,2) fails-if(stylo) == fallback-color-04.svg pass.svg +fuzzy-if(skiaContent,1,2) == fallback-color-04.svg pass.svg == fallback-color-05.svg fallback-color-05-ref.svg == filter-basic-01.svg pass.svg @@ -236,10 +236,10 @@ fuzzy-if(Android,18,600) == foreignObject-fixedpos-01.html foreignObject-dynamic == getElementById-a-element-01.svg pass.svg -fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) fails-if(stylo) == gradient-live-01a.svg gradient-live-01-ref.svg -fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) fails-if(stylo) == gradient-live-01b.svg gradient-live-01-ref.svg -fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) fails-if(stylo) == gradient-live-01c.svg gradient-live-01-ref.svg -fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) fails-if(stylo) == gradient-live-01d.svg gradient-live-01-ref.svg +fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) == gradient-live-01a.svg gradient-live-01-ref.svg +fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) == gradient-live-01b.svg gradient-live-01-ref.svg +fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) == gradient-live-01c.svg gradient-live-01-ref.svg +fuzzy-if(Android,9,980) fuzzy-if(skiaContent,3,32000) == gradient-live-01d.svg gradient-live-01-ref.svg == gradient-transform-01.svg pass.svg == href-attr-change-restyles.svg href-attr-change-restyles-ref.svg fuzzy-if(skiaContent,1,550) == import-svg-01.html pass.svg @@ -319,7 +319,7 @@ fuzzy-if(skiaContent,1,10000) == opacity-and-transform-01.svg opacity-and-transf fuzzy-if(Android,8,200) == outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg -fuzzy-if(skiaContent,7,175) fuzzy-if(skiaContent&&webrender,1,225) fails-if(stylo) == outline.html outline-ref.html +fuzzy-if(skiaContent,7,175) fuzzy-if(skiaContent&&webrender,1,225) == outline.html outline-ref.html == overflow-on-outer-svg-01.svg overflow-on-outer-svg-01-ref.svg == overflow-on-outer-svg-02a.xhtml overflow-on-outer-svg-02-ref.xhtml @@ -333,7 +333,7 @@ fuzzy-if(skiaContent,7,175) fuzzy-if(skiaContent&&webrender,1,225) fails-if(styl == paint-on-maskLayer-1b.html paint-on-maskLayer-1-ref.html pref(layout.css.clip-path-shapes.enabled,true) == paint-on-maskLayer-1c.html paint-on-maskLayer-1-ref.html pref(svg.paint-order.enabled,true) == paint-order-01.svg paint-order-01-ref.svg -pref(svg.paint-order.enabled,true) fails-if(stylo) == paint-order-02.svg paint-order-02-ref.svg +pref(svg.paint-order.enabled,true) == paint-order-02.svg paint-order-02-ref.svg pref(svg.paint-order.enabled,true) == paint-order-03.svg paint-order-03-ref.svg #fuzzy(23,60) fails-if(d2d) == path-01.svg path-01-ref.svg @@ -439,19 +439,19 @@ fuzzy-if(skiaContent,1,5500) == text-gradient-03.svg pass.svg HTTP(..) == text-gradient-04.svg text-gradient-04-ref.svg == text-in-link-01.svg text-in-link-01-ref.svg == text-in-link-02.svg text-in-link-02-ref.svg -fails-if(stylo) == text-in-link-03.svg text-in-link-03-ref.svg +== text-in-link-03.svg text-in-link-03-ref.svg # Tests for bug 546813: sanity-check using HTML text, then test SVG behavior. != text-language-00.xhtml text-language-00-ref.xhtml random-if(gtkWidget) != text-language-01.xhtml text-language-01-ref.xhtml # Fails on Linux tryserver due to lack of CJK fonts. -random-if(stylo) == text-layout-01.svg text-layout-01-ref.svg -fails-if(stylo) == text-layout-02.svg text-layout-02-ref.svg -fails-if(stylo) == text-layout-03.svg text-layout-03-ref.svg -fails-if(stylo) == text-layout-04.svg text-layout-04-ref.svg +== text-layout-01.svg text-layout-01-ref.svg +== text-layout-02.svg text-layout-02-ref.svg +== text-layout-03.svg text-layout-03-ref.svg +== text-layout-04.svg text-layout-04-ref.svg == text-layout-05.svg text-layout-05-ref.svg -fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,3) fails-if(stylo) == text-layout-06.svg text-layout-06-ref.svg -fails-if(stylo) == text-layout-07.svg text-layout-07-ref.svg +fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,3) == text-layout-06.svg text-layout-06-ref.svg +== text-layout-07.svg text-layout-07-ref.svg == text-layout-08.svg text-layout-08-ref.svg -fails-if(stylo) == text-scale-01.svg text-scale-01-ref.svg +== text-scale-01.svg text-scale-01-ref.svg fuzzy-if(skiaContent,2,1000) HTTP(..) == text-scale-02.svg text-scale-02-ref.svg HTTP(..) == text-scale-03.svg text-scale-03-ref.svg @@ -465,7 +465,7 @@ HTTP(..) == text-scale-03.svg text-scale-03-ref.svg fuzzy(16,3) == text-stroke-scaling-02a.html text-stroke-scaling-02-ref.html # antialiasing fuzzy(16,3) == text-stroke-scaling-02b.html text-stroke-scaling-02-ref.html # antialiasing == text-stroke-scaling-02a.html text-stroke-scaling-02b.html -fails-if(stylo) == textPath-01.svg textPath-01-ref.svg +== textPath-01.svg textPath-01-ref.svg == textPath-02.svg pass.svg fuzzy-if(skiaContent,1,610) == textPath-03.svg pass.svg == textPath-04.svg pass.svg diff --git a/layout/reftests/svg/smil/style/reftest.list b/layout/reftests/svg/smil/style/reftest.list index b06c0fff45c4..4cc86c4adffa 100644 --- a/layout/reftests/svg/smil/style/reftest.list +++ b/layout/reftests/svg/smil/style/reftest.list @@ -71,14 +71,14 @@ fails-if(stylo) == anim-css-fontsize-1-from-by-px-px.svg anim-css-fontsize-1- == anim-css-fontsize-1-from-to-px-px.svg anim-css-fontsize-1-ref.svg # 'font-size' property (accepts unitless values) -fails-if(stylo) == anim-css-fontsize-1-from-to-no-no.svg anim-css-fontsize-1-ref.svg -fails-if(stylo) == anim-css-fontsize-1-from-to-no-px.svg anim-css-fontsize-1-ref.svg -fails-if(stylo) == anim-css-fontsize-1-from-to-px-no.svg anim-css-fontsize-1-ref.svg +== anim-css-fontsize-1-from-to-no-no.svg anim-css-fontsize-1-ref.svg +== anim-css-fontsize-1-from-to-no-px.svg anim-css-fontsize-1-ref.svg +== anim-css-fontsize-1-from-to-px-no.svg anim-css-fontsize-1-ref.svg # 'font-size' mapped attribute (accepts unitless values) -fails-if(stylo) == anim-mapped-fontsize-1-from-to-no-no.svg anim-css-fontsize-1-ref.svg -fails-if(stylo) == anim-mapped-fontsize-1-from-to-no-px.svg anim-css-fontsize-1-ref.svg -fails-if(stylo) == anim-mapped-fontsize-1-from-to-px-no.svg anim-css-fontsize-1-ref.svg +== anim-mapped-fontsize-1-from-to-no-no.svg anim-css-fontsize-1-ref.svg +== anim-mapped-fontsize-1-from-to-no-px.svg anim-css-fontsize-1-ref.svg +== anim-mapped-fontsize-1-from-to-px-no.svg anim-css-fontsize-1-ref.svg # 'font-size' property, from/by/to with percent values fails-if(stylo) == anim-css-fontsize-1-from-by-pct-pct.svg anim-css-fontsize-1-ref.svg From 893c284e81535cb9ff1f5e5572b6fe39166fed72 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Sun, 21 May 2017 12:40:00 -0500 Subject: [PATCH 14/35] servo: Merge #16957 - Update libfontconfig (from MortimerGoro:update_libfontconfig); r=jdm See https://github.com/servo/libfontconfig/pull/29. Required for #11921 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ Source-Repo: https://github.com/servo/servo Source-Revision: cdf52773a153fa64dadb2c84ec4d7c24bac692eb --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 8bcf639ae96ed7df4e40512715a4e0e39d055798 --- servo/Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servo/Cargo.lock b/servo/Cargo.lock index add60c19c96a..3175cd557286 100644 --- a/servo/Cargo.lock +++ b/servo/Cargo.lock @@ -2554,12 +2554,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-fontconfig-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "servo-fontconfig-sys" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "expat-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2616,7 +2616,7 @@ dependencies = [ "io-surface 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "servo-fontconfig-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "servo-fontconfig-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "servo-glutin 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.13.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3646,7 +3646,7 @@ dependencies = [ "checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1" "checksum servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21069a884c33fe6ee596975e1f3849ed88c4ec857fbaf11d33672d8ebe051217" "checksum servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "93f799b649b4a2bf362398910eca35240704c7e765e780349b2bb1070d892262" -"checksum servo-fontconfig-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a0af4a4d7746467921486e5c5420f815cc016a6bf5574210d8e9c00f4afae224" +"checksum servo-fontconfig-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6be80777ee6edecbbbf8774c76e19dddfe336256c57a4ded06d6ad3df7be358e" "checksum servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" "checksum servo-glutin 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8398095f9b3dc3c6d706d395e192624be1f1bcc6f366b009fe17a20cb5dd3d72" "checksum servo-skia 0.30000004.1 (registry+https://github.com/rust-lang/crates.io-index)" = "22ba980da523e91b9d2f7da9fb35f721138a1e604b8d8191e56f403e4760a9e4" From 05d8bb3c6523a3c5774ffe9a7ea21d4ecfa1326b Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 14:33:21 -0700 Subject: [PATCH 15/35] Bug 989373, part 1 - Remove pref for reusing globals with JSMs. r=kmag Removing support for this preference means that mReuseLoaderGlobal will always be false, which lets us eliminate that field, and remove a lot of code. This also means that false is always passed to PrepareObjectForLocation for aReuseLoaderGlobal. ReadCachedFunction is no longer used, so it is deleted. MozReview-Commit-ID: 5JD24EYVcQf --HG-- extra : rebase_source : 3b23b4b8d2b1a2f6a53223477afb4cb13b8a671c --- dom/ipc/ContentPrefs.cpp | 1 - js/xpconnect/loader/mozJSComponentLoader.cpp | 152 +++---------------- js/xpconnect/loader/mozJSComponentLoader.h | 2 - js/xpconnect/loader/mozJSLoaderUtils.cpp | 8 - js/xpconnect/loader/mozJSLoaderUtils.h | 5 - modules/libpref/init/all.js | 6 - 6 files changed, 23 insertions(+), 151 deletions(-) diff --git a/dom/ipc/ContentPrefs.cpp b/dom/ipc/ContentPrefs.cpp index b79888ed3e85..5923529ecaaa 100644 --- a/dom/ipc/ContentPrefs.cpp +++ b/dom/ipc/ContentPrefs.cpp @@ -113,7 +113,6 @@ const char* mozilla::dom::ContentPrefs::gInitPrefs[] = { "javascript.options.wasm_baselinejit", "javascript.options.werror", "javascript.use_us_english_locale", - "jsloader.reuseGlobal", "layout.idle_period.required_quiescent_frames", "layout.idle_period.time_limit", "layout.interruptible-reflow.enabled", diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index b4a04f1561f2..74f896eb0c13 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -54,11 +54,6 @@ using namespace mozilla::scache; using namespace xpc; using namespace JS; -// This JSClass exists to trick silly code that expects toString()ing the -// global in a component scope to return something with "BackstagePass" in it -// to continue working. -static const JSClass kFakeBackstagePassJSClass = { "FakeBackstagePass" }; - static const char kObserverServiceContractID[] = "@mozilla.org/observer-service;1"; static const char kJSCachePrefix[] = "jsloader"; @@ -196,8 +191,7 @@ mozJSComponentLoader::mozJSComponentLoader() : mModules(16), mImports(16), mInProgressImports(16), - mInitialized(false), - mReuseLoaderGlobal(false) + mInitialized(false) { MOZ_ASSERT(!sSelf, "mozJSComponentLoader should be a singleton"); @@ -300,8 +294,6 @@ mozJSComponentLoader::ReallyInit() { nsresult rv; - mReuseLoaderGlobal = Preferences::GetBool("jsloader.reuseGlobal"); - nsCOMPtr secman = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID); if (!secman) @@ -430,9 +422,7 @@ mozJSComponentLoader::LoadModule(FileLocation& aFile) // Set the location information for the new global, so that tools like // about:memory may use that information - if (!mReuseLoaderGlobal) { - xpc::SetLocationForGlobal(entryObj, spec); - } + xpc::SetLocationForGlobal(entryObj, spec); // The hash owns the ModuleEntry now, forget about it return entry.forget(); @@ -442,27 +432,7 @@ void mozJSComponentLoader::FindTargetObject(JSContext* aCx, MutableHandleObject aTargetObject) { - aTargetObject.set(nullptr); - - RootedObject targetObject(aCx); - if (mReuseLoaderGlobal) { - JSFunction* fun = js::GetOutermostEnclosingFunctionOfScriptedCaller(aCx); - if (fun) { - JSObject* funParent = js::GetNearestEnclosingWithEnvironmentObjectForFunction(fun); - if (JS_GetClass(funParent) == &kFakeBackstagePassJSClass) - targetObject = funParent; - } - } - - // The above could fail, even if mReuseLoaderGlobal, if the scripted - // caller is not a component/JSM (it could be a DOM scope, for - // instance). - if (!targetObject) { - // Our targetObject is the caller's global object. Let's get it. - targetObject = CurrentGlobalOrNull(aCx); - } - - aTargetObject.set(targetObject); + aTargetObject.set(CurrentGlobalOrNull(aCx)); } // This requires that the keys be strings and the values be pointers. @@ -512,14 +482,9 @@ JSObject* mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, nsIFile* aComponentFile, nsIURI* aURI, - bool aReuseLoaderGlobal, bool* aRealFile) { nsCOMPtr holder; - if (aReuseLoaderGlobal) { - holder = mLoaderGlobal; - } - nsresult rv = NS_OK; bool createdNewGlobal = false; @@ -532,7 +497,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, options.creationOptions() .setSystemZone() - .setAddonId(aReuseLoaderGlobal ? nullptr : MapURIToAddonID(aURI)); + .setAddonId(MapURIToAddonID(aURI)); options.behaviors().setVersion(JSVERSION_LATEST); @@ -562,10 +527,6 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, !JS_DefineProfilingFunctions(aCx, global)) { return nullptr; } - - if (aReuseLoaderGlobal) { - mLoaderGlobal = holder; - } } RootedObject obj(aCx, holder->GetJSObject()); @@ -573,13 +534,6 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, JSAutoCompartment ac(aCx, obj); - if (aReuseLoaderGlobal) { - // If we're reusing the loader global, we don't actually use the - // global, but rather we use a different object as the 'this' object. - obj = JS_NewObject(aCx, &kFakeBackstagePassJSClass); - NS_ENSURE_TRUE(obj, nullptr); - } - *aRealFile = false; // need to be extra careful checking for URIs pointing to files @@ -651,9 +605,9 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, nsresult rv = aInfo.EnsureURI(); NS_ENSURE_SUCCESS(rv, rv); RootedObject obj(cx, PrepareObjectForLocation(cx, aComponentFile, aInfo.URI(), - mReuseLoaderGlobal, &realFile)); + &realFile)); NS_ENSURE_TRUE(obj, NS_ERROR_FAILURE); - MOZ_ASSERT(JS_IsGlobalObject(obj) == !mReuseLoaderGlobal); + MOZ_ASSERT(JS_IsGlobalObject(obj)); JSAutoCompartment ac(cx, obj); @@ -675,14 +629,9 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, rv = PathifyURI(aInfo.URI(), cachePath); NS_ENSURE_SUCCESS(rv, rv); - if (!mReuseLoaderGlobal) { - script = ScriptPreloader::GetSingleton().GetCachedScript(cx, cachePath); - if (!script && cache) { - ReadCachedScript(cache, cachePath, cx, mSystemPrincipal, &script); - } - } else if (cache) { - ReadCachedFunction(cache, cachePath, cx, mSystemPrincipal, - function.address()); + script = ScriptPreloader::GetSingleton().GetCachedScript(cx, cachePath); + if (!script && cache) { + ReadCachedScript(cache, cachePath, cx, mSystemPrincipal, &script); } if (script || function) { @@ -692,8 +641,7 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, // cache. Could mean that the cache was corrupted and got removed, // but either way we're going to write this out. writeToCache = true; - // ReadCachedScript and ReadCachedFunction may have set a pending - // exception. + // ReadCachedScript may have set a pending exception. JS_ClearPendingException(cx); } @@ -701,26 +649,17 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, // The script wasn't in the cache , so compile it now. LOG(("Slow loading %s\n", nativePath.get())); - // Use lazy source if both of these conditions hold: - // - // (1) mReuseLoaderGlobal is false. If mReuseLoaderGlobal is true, we - // can't do lazy source because we compile things as functions - // (rather than script), and lazy source isn't supported in that - // configuration. That's ok though, because we only do - // mReuseLoaderGlobal on b2g, where we invoke setDiscardSource(true) - // on the entire global. - // - // (2) We're using the startup cache. Non-lazy source + startup cache - // regresses installer size (due to source code stored in XDR - // encoded modules in omni.ja). Also, XDR decoding is relatively - // fast. Content processes don't use the startup cache, so we want - // them to use non-lazy source code to enable lazy parsing. - // See bug 1303754. + // Use lazy source if we're using the startup cache. Non-lazy source + + // startup cache regresses installer size (due to source code stored in + // XDR encoded modules in omni.ja). Also, XDR decoding is relatively + // fast. When we're not using the startup cache, we want to use non-lazy + // source code so that we can use lazy parsing. + // See bug 1303754. CompileOptions options(cx); - options.setNoScriptRval(mReuseLoaderGlobal ? false : true) + options.setNoScriptRval(true) .setVersion(JSVERSION_LATEST) .setFileAndLine(nativePath.get(), 1) - .setSourceIsLazy(!mReuseLoaderGlobal && !!cache); + .setSourceIsLazy(!!cache); if (realFile) { int64_t fileSize; @@ -766,18 +705,9 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, return NS_ERROR_FAILURE; } - if (!mReuseLoaderGlobal) { - Compile(cx, options, buf, fileSize32, &script); - } else { - // Note: exceptions will get handled further down; - // don't early return for them here. - AutoObjectVector envChain(cx); - if (envChain.append(obj)) { - CompileFunction(cx, envChain, - options, nullptr, 0, nullptr, - buf, fileSize32, &function); - } - } + // Note: exceptions will get handled further down; + // don't early return for them here. + Compile(cx, options, buf, fileSize32, &script); PR_MemUnmap(buf, fileSize32); } else { @@ -810,18 +740,7 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, buf[len] = '\0'; - if (!mReuseLoaderGlobal) { - Compile(cx, options, buf.get(), bytesRead, &script); - } else { - // Note: exceptions will get handled further down; - // don't early return for them here. - AutoObjectVector envChain(cx); - if (envChain.append(obj)) { - CompileFunction(cx, envChain, - options, nullptr, 0, nullptr, - buf.get(), bytesRead, &function); - } - } + Compile(cx, options, buf.get(), bytesRead, &script); } // Propagate the exception, if one exists. Also, don't leave the stale // exception on this context. @@ -924,26 +843,6 @@ mozJSComponentLoader::UnloadModules() { mInitialized = false; - if (mLoaderGlobal) { - MOZ_ASSERT(mReuseLoaderGlobal, "How did this happen?"); - - dom::AutoJSAPI jsapi; - jsapi.Init(); - JSContext* cx = jsapi.cx(); - RootedObject global(cx, mLoaderGlobal->GetJSObject()); - if (global) { - JSAutoCompartment ac(cx, global); - if (JS_HasExtensibleLexicalEnvironment(global)) { - JS_SetAllNonReservedSlotsToUndefined(cx, JS_ExtensibleLexicalEnvironment(global)); - } - JS_SetAllNonReservedSlotsToUndefined(cx, global); - } else { - NS_WARNING("Going to leak!"); - } - - mLoaderGlobal = nullptr; - } - mInProgressImports.Clear(); mImports.Clear(); @@ -1141,9 +1040,7 @@ mozJSComponentLoader::ImportInto(const nsACString& aLocation, // Set the location information for the new global, so that tools like // about:memory may use that information - if (!mReuseLoaderGlobal) { - xpc::SetLocationForGlobal(newEntry->obj, aLocation); - } + xpc::SetLocationForGlobal(newEntry->obj, aLocation); mod = newEntry; } @@ -1286,9 +1183,6 @@ mozJSComponentLoader::Unload(const nsACString & aLocation) return NS_OK; } - MOZ_RELEASE_ASSERT(!mReuseLoaderGlobal, "Module unloading not supported when " - "compartment sharing is enabled"); - ComponentLoaderInfo info(aLocation); rv = info.EnsureKey(); NS_ENSURE_SUCCESS(rv, rv); diff --git a/js/xpconnect/loader/mozJSComponentLoader.h b/js/xpconnect/loader/mozJSComponentLoader.h index c3a6c1c6e033..02ccba809bb6 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.h +++ b/js/xpconnect/loader/mozJSComponentLoader.h @@ -65,7 +65,6 @@ class mozJSComponentLoader : public mozilla::ModuleLoader, JSObject* PrepareObjectForLocation(JSContext* aCx, nsIFile* aComponentFile, nsIURI* aComponent, - bool aReuseLoaderGlobal, bool* aRealFile); nsresult ObjectForLocation(ComponentLoaderInfo& aInfo, @@ -155,7 +154,6 @@ class mozJSComponentLoader : public mozilla::ModuleLoader, nsDataHashtable mInProgressImports; bool mInitialized; - bool mReuseLoaderGlobal; }; #endif diff --git a/js/xpconnect/loader/mozJSLoaderUtils.cpp b/js/xpconnect/loader/mozJSLoaderUtils.cpp index abc8aa3bba69..ecaceccc69cf 100644 --- a/js/xpconnect/loader/mozJSLoaderUtils.cpp +++ b/js/xpconnect/loader/mozJSLoaderUtils.cpp @@ -43,14 +43,6 @@ ReadCachedScript(StartupCache* cache, nsACString& uri, JSContext* cx, return NS_ERROR_OUT_OF_MEMORY; } -nsresult -ReadCachedFunction(StartupCache* cache, nsACString& uri, JSContext* cx, - nsIPrincipal* systemPrincipal, JSFunction** functionp) -{ - // This doesn't actually work ... - return NS_ERROR_NOT_IMPLEMENTED; -} - nsresult WriteCachedScript(StartupCache* cache, nsACString& uri, JSContext* cx, nsIPrincipal* systemPrincipal, HandleScript script) diff --git a/js/xpconnect/loader/mozJSLoaderUtils.h b/js/xpconnect/loader/mozJSLoaderUtils.h index 9adf82bf6fbf..e44b00261161 100644 --- a/js/xpconnect/loader/mozJSLoaderUtils.h +++ b/js/xpconnect/loader/mozJSLoaderUtils.h @@ -20,11 +20,6 @@ ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, JSContext* cx, nsIPrincipal* systemPrincipal, JS::MutableHandleScript scriptp); -nsresult -ReadCachedFunction(mozilla::scache::StartupCache* cache, nsACString& uri, - JSContext* cx, nsIPrincipal* systemPrincipal, - JSFunction** function); - nsresult WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, JSContext* cx, nsIPrincipal* systemPrincipal, diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ef9951e6d503..857db5880777 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -5072,12 +5072,6 @@ pref("dom.idle-observers-api.fuzz_time.disabled", true); // a restart is required to enable a new value. pref("network.activity.blipIntervalMilliseconds", 0); -// If true, reuse the same global for everything loaded by the component loader -// (JS components, JSMs, etc). This saves memory, but makes it possible for -// the scripts to interfere with each other. A restart is required for this -// to take effect. -pref("jsloader.reuseGlobal", false); - // When we're asked to take a screenshot, don't wait more than 2000ms for the // event loop to become idle before actually taking the screenshot. pref("dom.browserElement.maxScreenshotDelayMS", 2000); From bcb1ad469bdcc2366316470867b9e6808d6012a9 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 14:39:52 -0700 Subject: [PATCH 16/35] Bug 989373, part 2 - Remove unused JS API methods related to global sharing while compiling to functions. r=shu These functions are only needed for B2G-style global sharing, which is based getting |this| as the special JSM object by compiling .jsms are functions. I left in place the comments relating this sharing because we may still reuse that machinery. MozReview-Commit-ID: IBBW5P70TQm --HG-- extra : rebase_source : 60cdf549db737ab8dac81c7f48ff7287639a851d --- js/src/jsapi-tests/moz.build | 1 - js/src/jsapi-tests/testEnclosingFunction.cpp | 68 -------------------- js/src/jsfriendapi.cpp | 28 -------- js/src/jsfriendapi.h | 20 ------ js/src/vm/EnvironmentObject.cpp | 17 ----- 5 files changed, 134 deletions(-) delete mode 100644 js/src/jsapi-tests/testEnclosingFunction.cpp diff --git a/js/src/jsapi-tests/moz.build b/js/src/jsapi-tests/moz.build index d4494489e4da..aaf1542368a3 100644 --- a/js/src/jsapi-tests/moz.build +++ b/js/src/jsapi-tests/moz.build @@ -27,7 +27,6 @@ UNIFIED_SOURCES += [ 'testDefinePropertyIgnoredAttributes.cpp', 'testDeflateStringToUTF8Buffer.cpp', 'testDifferentNewTargetInvokeConstructor.cpp', - 'testEnclosingFunction.cpp', 'testErrorCopying.cpp', 'testException.cpp', 'testExternalArrayBuffer.cpp', diff --git a/js/src/jsapi-tests/testEnclosingFunction.cpp b/js/src/jsapi-tests/testEnclosingFunction.cpp deleted file mode 100644 index 4482d4e589fa..000000000000 --- a/js/src/jsapi-tests/testEnclosingFunction.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * vim: set ts=8 sts=4 et sw=4 tw=99: - * - * Test script cloning. - */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsfriendapi.h" - -#include "jsapi-tests/tests.h" - -using namespace js; - -static JSFunction* foundFun = nullptr; - -static bool -CheckEnclosing(JSContext* cx, unsigned argc, Value* vp) -{ - CallArgs args = CallArgsFromVp(argc, vp); - - foundFun = js::GetOutermostEnclosingFunctionOfScriptedCaller(cx); - - args.rval().set(UndefinedValue()); - return true; -} - -BEGIN_TEST(test_enclosingFunction) -{ - CHECK(JS_DefineFunction(cx, global, "checkEnclosing", CheckEnclosing, 0, 0)); - - EXEC("checkEnclosing()"); - CHECK(foundFun == nullptr); - - RootedFunction fun(cx); - - JS::CompileOptions options(cx); - options.setFileAndLine(__FILE__, __LINE__); - - const char s1chars[] = "checkEnclosing()"; - JS::AutoObjectVector emptyScopeChain(cx); - CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "s1", 0, nullptr, s1chars, - strlen(s1chars), &fun)); - CHECK(fun); - CHECK(JS_DefineProperty(cx, global, "s1", fun, JSPROP_ENUMERATE)); - EXEC("s1()"); - CHECK(foundFun == fun); - - const char s2chars[] = "return function() { checkEnclosing() }"; - CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "s2", 0, nullptr, s2chars, - strlen(s2chars), &fun)); - CHECK(fun); - CHECK(JS_DefineProperty(cx, global, "s2", fun, JSPROP_ENUMERATE)); - EXEC("s2()()"); - CHECK(foundFun == fun); - - const char s3chars[] = "return function() { { let x; function g() { checkEnclosing() } return g() } }"; - CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "s3", 0, nullptr, s3chars, - strlen(s3chars), &fun)); - CHECK(fun); - CHECK(JS_DefineProperty(cx, global, "s3", fun, JSPROP_ENUMERATE)); - EXEC("s3()()"); - CHECK(foundFun == fun); - - return true; -} -END_TEST(test_enclosingFunction) diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index ade062ad6f2f..fa5899609582 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -418,34 +418,6 @@ js::RunningWithTrustedPrincipals(JSContext* cx) return cx->runningWithTrustedPrincipals(); } -JS_FRIEND_API(JSFunction*) -js::GetOutermostEnclosingFunctionOfScriptedCaller(JSContext* cx) -{ - ScriptFrameIter iter(cx); - - // Skip eval frames. - while (!iter.done() && iter.isEvalFrame()) - ++iter; - - if (iter.done()) - return nullptr; - - if (!iter.isFunctionFrame()) - return nullptr; - - if (iter.compartment() != cx->compartment()) - return nullptr; - - RootedFunction curr(cx, iter.callee(cx)); - for (ScopeIter si(curr->nonLazyScript()); si; si++) { - if (si.kind() == ScopeKind::Function) - curr = si.scope()->as().canonicalFunction(); - } - - assertSameCompartment(cx, curr); - return curr; -} - JS_FRIEND_API(JSFunction*) js::DefineFunctionWithReserved(JSContext* cx, JSObject* objArg, const char* name, JSNative call, unsigned nargs, unsigned attrs) diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index 3e9b8ceabf02..16429fc20a91 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -667,18 +667,6 @@ inline void AssertSameCompartment(JSObject* objA, JSObject* objB) {} JS_FRIEND_API(void) NotifyAnimationActivity(JSObject* obj); -/** - * Return the outermost enclosing function (script) of the scripted caller. - * This function returns nullptr in several cases: - * - no script is running on the context - * - the caller is in global or eval code - * In particular, this function will "stop" its outermost search at eval() and - * thus it will really return the outermost enclosing function *since the - * innermost eval*. - */ -JS_FRIEND_API(JSFunction*) -GetOutermostEnclosingFunctionOfScriptedCaller(JSContext* cx); - JS_FRIEND_API(JSFunction*) DefineFunctionWithReserved(JSContext* cx, JSObject* obj, const char* name, JSNative call, unsigned nargs, unsigned attrs); @@ -2840,14 +2828,6 @@ extern JS_FRIEND_API(void) SetJitExceptionHandler(JitExceptionHandler handler); #endif -/** - * Get the nearest enclosing with environment object for a given function. If - * the function is not scripted or is not enclosed by a with scope, returns - * the global. - */ -extern JS_FRIEND_API(JSObject*) -GetNearestEnclosingWithEnvironmentObjectForFunction(JSFunction* fun); - /** * Get the first SavedFrame object in this SavedFrame stack whose principals are * subsumed by the cx's principals. If there is no such frame, return nullptr. diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp index 1e6458568496..5d2929b68572 100644 --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -3095,23 +3095,6 @@ js::GetDebugEnvironmentForGlobalLexicalEnvironment(JSContext* cx) return GetDebugEnvironment(cx, ei); } -// See declaration and documentation in jsfriendapi.h -JS_FRIEND_API(JSObject*) -js::GetNearestEnclosingWithEnvironmentObjectForFunction(JSFunction* fun) -{ - if (!fun->isInterpreted()) - return &fun->global(); - - JSObject* env = fun->environment(); - while (env && !env->is()) - env = env->enclosingEnvironment(); - - if (!env) - return &fun->global(); - - return &env->as().object(); -} - bool js::CreateObjectsForEnvironmentChain(JSContext* cx, AutoObjectVector& chain, HandleObject terminatingEnv, MutableHandleObject envObj) From 07e8c202890502975184148b299d7662a412389d Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 15:00:46 -0700 Subject: [PATCH 17/35] Bug 989373, part 3 - |function| is always null in ObjectForLocation. r=kmag With the changes in part 1, the local variable |function| is always null in ObjectForLocation, which lets me remove a lot of dead code. Additionally, in the second half of the function we know that |script| is always non-null, because we return with a failure before then if it isn't null. In addition, with these changes WriteCachedFunction is no longer called, so I removed it. MozReview-Commit-ID: 60hEPi8S3H4 --HG-- extra : rebase_source : 69ea6110fb85d02d2f1c72c5675014aeebb2dee5 --- js/xpconnect/loader/mozJSComponentLoader.cpp | 55 +++++--------------- js/xpconnect/loader/mozJSLoaderUtils.cpp | 8 --- js/xpconnect/loader/mozJSLoaderUtils.h | 4 -- 3 files changed, 12 insertions(+), 55 deletions(-) diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index 74f896eb0c13..198774456bea 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -612,7 +612,6 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, JSAutoCompartment ac(cx, obj); RootedScript script(cx); - RootedFunction function(cx); nsAutoCString nativePath; rv = aInfo.URI()->GetSpec(nativePath); @@ -634,7 +633,7 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, ReadCachedScript(cache, cachePath, cx, mSystemPrincipal, &script); } - if (script || function) { + if (script) { LOG(("Successfully loaded %s from startupcache\n", nativePath.get())); } else if (cache) { // This is ok, it just means the script is not yet in the @@ -645,7 +644,7 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, JS_ClearPendingException(cx); } - if (!script && !function) { + if (!script) { // The script wasn't in the cache , so compile it now. LOG(("Slow loading %s\n", nativePath.get())); @@ -744,36 +743,22 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, } // Propagate the exception, if one exists. Also, don't leave the stale // exception on this context. - if (!script && !function && aPropagateExceptions && - jsapi.HasException()) { + if (!script && aPropagateExceptions && jsapi.HasException()) { if (!jsapi.StealException(aException)) return NS_ERROR_OUT_OF_MEMORY; } } - if (!script && !function) { + if (!script) { return NS_ERROR_FAILURE; } - // We must have a script or a function (but not both!) here. We have a - // script when we're not reusing the loader global, and a function - // otherwise. - MOZ_ASSERT(!!script != !!function); - MOZ_ASSERT(!!script == JS_IsGlobalObject(obj)); - - if (script) { - ScriptPreloader::GetSingleton().NoteScript(nativePath, cachePath, script); - } + ScriptPreloader::GetSingleton().NoteScript(nativePath, cachePath, script); if (writeToCache) { // We successfully compiled the script, so cache it. - if (script) { - rv = WriteCachedScript(cache, cachePath, cx, mSystemPrincipal, - script); - } else { - rv = WriteCachedFunction(cache, cachePath, cx, mSystemPrincipal, - function); - } + rv = WriteCachedScript(cache, cachePath, cx, mSystemPrincipal, + script); // Don't treat failure to write as fatal, since we might be working // with a read-only cache. @@ -788,34 +773,18 @@ mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo& aInfo, // See bug 384168. aObject.set(obj); - RootedScript tableScript(cx, script); - if (!tableScript) { - tableScript = JS_GetFunctionScript(cx, function); - MOZ_ASSERT(tableScript); - } - - aTableScript.set(tableScript); + aTableScript.set(script); { // Scope for AutoEntryScript - // We're going to run script via JS_ExecuteScript or - // JS_CallFunction, so we need an AutoEntryScript. - // This is Gecko-specific and not in any spec. + // We're going to run script via JS_ExecuteScript, so we need an + // AutoEntryScript. This is Gecko-specific and not in any spec. dom::AutoEntryScript aes(CurrentGlobalOrNull(cx), "component loader load module"); JSContext* aescx = aes.cx(); - bool ok; - if (script) { - JS::RootedValue rval(cx); - ok = JS::CloneAndExecuteScript(aescx, script, &rval); - } else { - RootedValue rval(cx); - ok = JS_CallFunction(aescx, obj, function, - JS::HandleValueArray::empty(), &rval); - } - - if (!ok) { + JS::RootedValue rval(cx); + if (!JS::CloneAndExecuteScript(aescx, script, &rval)) { if (aPropagateExceptions && aes.HasException()) { // Ignore return value because we're returning an error code // anyway. diff --git a/js/xpconnect/loader/mozJSLoaderUtils.cpp b/js/xpconnect/loader/mozJSLoaderUtils.cpp index ecaceccc69cf..44a9a7a9ed77 100644 --- a/js/xpconnect/loader/mozJSLoaderUtils.cpp +++ b/js/xpconnect/loader/mozJSLoaderUtils.cpp @@ -67,11 +67,3 @@ WriteCachedScript(StartupCache* cache, nsACString& uri, JSContext* cx, size); return rv; } - -nsresult -WriteCachedFunction(StartupCache* cache, nsACString& uri, JSContext* cx, - nsIPrincipal* systemPrincipal, JSFunction* function) -{ - // This doesn't actually work ... - return NS_ERROR_NOT_IMPLEMENTED; -} diff --git a/js/xpconnect/loader/mozJSLoaderUtils.h b/js/xpconnect/loader/mozJSLoaderUtils.h index e44b00261161..9cd890155090 100644 --- a/js/xpconnect/loader/mozJSLoaderUtils.h +++ b/js/xpconnect/loader/mozJSLoaderUtils.h @@ -24,9 +24,5 @@ nsresult WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, JSContext* cx, nsIPrincipal* systemPrincipal, JS::HandleScript script); -nsresult -WriteCachedFunction(mozilla::scache::StartupCache* cache, nsACString& uri, - JSContext* cx, nsIPrincipal* systemPrincipal, - JSFunction* function); #endif /* mozJSLoaderUtils_h */ From 87bdd721cab464c228dfcefcd2f162d9c8b88a17 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 15:04:45 -0700 Subject: [PATCH 18/35] Bug 989373, part 4 - Remove reuse global flag from subscript loader. r=kmag FindTargetObject in DoLoadSubScriptWithOptions will always return a global object, so the boolean values we pass around to determine if a global was being reused will always be false. The next patch will eliminate the various |function| arguments that are now unused. MozReview-Commit-ID: GvPNFGluRub --HG-- extra : rebase_source : 76a67f5523153a37942c2730388e62125ecf4390 --- js/xpconnect/loader/mozJSSubScriptLoader.cpp | 81 +++++++------------- js/xpconnect/loader/mozJSSubScriptLoader.h | 10 ++- 2 files changed, 32 insertions(+), 59 deletions(-) diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.cpp b/js/xpconnect/loader/mozJSSubScriptLoader.cpp index f8e45d53f2a9..ccc762bc3e99 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp +++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp @@ -132,15 +132,12 @@ PrepareScript(nsIURI* uri, const nsAString& charset, const char* buf, int64_t len, - bool reuseGlobal, bool wantReturnValue, MutableHandleScript script, MutableHandleFunction function) { JS::CompileOptions options(cx); - // Use line 0 to make the function body starts from line 1 when - // |reuseGlobal == true|. - options.setFileAndLine(uriStr, reuseGlobal ? 0 : 1) + options.setFileAndLine(uriStr, 1) .setVersion(JSVERSION_LATEST) .setNoScriptRval(!wantReturnValue); if (!charset.IsVoid()) { @@ -159,34 +156,18 @@ PrepareScript(nsIURI* uri, return false; } - if (!reuseGlobal) { - if (JS_IsGlobalObject(targetObj)) { - return JS::Compile(cx, options, srcBuf, script); - } - return JS::CompileForNonSyntacticScope(cx, options, srcBuf, script); + if (JS_IsGlobalObject(targetObj)) { + return JS::Compile(cx, options, srcBuf, script); } - AutoObjectVector envChain(cx); - if (!JS_IsGlobalObject(targetObj) && !envChain.append(targetObj)) { - return false; - } - return JS::CompileFunction(cx, envChain, options, nullptr, 0, nullptr, - srcBuf, function); + return JS::CompileForNonSyntacticScope(cx, options, srcBuf, script); } // We only use lazy source when no special encoding is specified because // the lazy source loader doesn't know the encoding. - if (!reuseGlobal) { - options.setSourceIsLazy(true); - if (JS_IsGlobalObject(targetObj)) { - return JS::Compile(cx, options, buf, len, script); - } - return JS::CompileForNonSyntacticScope(cx, options, buf, len, script); + options.setSourceIsLazy(true); + if (JS_IsGlobalObject(targetObj)) { + return JS::Compile(cx, options, buf, len, script); } - AutoObjectVector envChain(cx); - if (!JS_IsGlobalObject(targetObj) && !envChain.append(targetObj)) { - return false; - } - return JS::CompileFunction(cx, envChain, options, nullptr, 0, nullptr, - buf, len, function); + return JS::CompileForNonSyntacticScope(cx, options, buf, len, script); } static bool @@ -270,14 +251,13 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AsyncScriptLoader) - AsyncScriptLoader(nsIChannel* aChannel, bool aReuseGlobal, bool aWantReturnValue, + AsyncScriptLoader(nsIChannel* aChannel, bool aWantReturnValue, JSObject* aTargetObj, const nsAString& aCharset, bool aCache, Promise* aPromise) : mChannel(aChannel) , mTargetObj(aTargetObj) , mPromise(aPromise) , mCharset(aCharset) - , mReuseGlobal(aReuseGlobal) , mWantReturnValue(aWantReturnValue) , mCache(aCache) { @@ -294,7 +274,6 @@ private: Heap mTargetObj; RefPtr mPromise; nsString mCharset; - bool mReuseGlobal; bool mWantReturnValue; bool mCache; }; @@ -404,7 +383,7 @@ AsyncScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader* aLoader, if (!PrepareScript(uri, cx, targetObj, spec.get(), mCharset, reinterpret_cast(aBuf), aLength, - mReuseGlobal, mWantReturnValue, &script, &function)) + mWantReturnValue, &script, &function)) { return NS_OK; } @@ -424,7 +403,6 @@ mozJSSubScriptLoader::ReadScriptAsync(nsIURI* uri, HandleObject targetObj, const nsAString& charset, nsIIOService* serv, - bool reuseGlobal, bool wantReturnValue, bool cache, MutableHandleValue retval) @@ -467,7 +445,6 @@ mozJSSubScriptLoader::ReadScriptAsync(nsIURI* uri, RefPtr loadObserver = new AsyncScriptLoader(channel, - reuseGlobal, wantReturnValue, targetObj, charset, @@ -489,7 +466,6 @@ mozJSSubScriptLoader::ReadScript(nsIURI* uri, const nsAString& charset, const char* uriStr, nsIIOService* serv, - bool reuseGlobal, bool wantReturnValue, MutableHandleScript script, MutableHandleFunction function) @@ -540,8 +516,7 @@ mozJSSubScriptLoader::ReadScript(nsIURI* uri, NS_ENSURE_SUCCESS(rv, false); return PrepareScript(uri, cx, targetObj, uriStr, charset, - buf.get(), len, - reuseGlobal, wantReturnValue, + buf.get(), len, wantReturnValue, script, function); } @@ -605,15 +580,13 @@ mozJSSubScriptLoader::DoLoadSubScriptWithOptions(const nsAString& url, } RootedObject targetObj(cx); - mozJSComponentLoader* loader = mozJSComponentLoader::Get(); - loader->FindTargetObject(cx, &targetObj); - - // We base reusingGlobal off of what the loader told us, but we may not - // actually be using that object. - bool reusingGlobal = !JS_IsGlobalObject(targetObj); - - if (options.target) + if (options.target) { targetObj = options.target; + } else { + mozJSComponentLoader* loader = mozJSComponentLoader::Get(); + loader->FindTargetObject(cx, &targetObj); + MOZ_ASSERT(JS_IsGlobalObject(targetObj)); + } // Remember an object out of the calling compartment so that we // can properly wrap the result later. @@ -710,20 +683,18 @@ mozJSSubScriptLoader::DoLoadSubScriptWithOptions(const nsAString& url, // If we are doing an async load, trigger it and bail out. if (!script && options.async) { return ReadScriptAsync(uri, targetObj, options.charset, serv, - reusingGlobal, options.wantReturnValue, - !!cache, retval); + options.wantReturnValue, !!cache, retval); } - if (!script) { - if (!ReadScript(uri, cx, targetObj, options.charset, - static_cast(uriStr.get()), serv, - reusingGlobal, options.wantReturnValue, &script, - &function)) - { - return NS_OK; - } - } else { + if (script) { + // |script| came from the cache, so don't bother writing it + // |back there. cache = nullptr; + } else if (!ReadScript(uri, cx, targetObj, options.charset, + static_cast(uriStr.get()), serv, + options.wantReturnValue, &script, + &function)) { + return NS_OK; } Unused << EvalScript(cx, targetObj, retval, uri, !!cache, diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.h b/js/xpconnect/loader/mozJSSubScriptLoader.h index 2630a2aaf75f..061c628b448c 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.h +++ b/js/xpconnect/loader/mozJSSubScriptLoader.h @@ -36,14 +36,16 @@ private: bool ReadScript(nsIURI* uri, JSContext* cx, JS::HandleObject targetObj, const nsAString& charset, const char* uriStr, nsIIOService* serv, - bool reuseGlobal, bool wantReturnValue, + bool wantReturnValue, JS::MutableHandleScript script, JS::MutableHandleFunction function); - nsresult ReadScriptAsync(nsIURI* uri, JS::HandleObject targetObj, + nsresult ReadScriptAsync(nsIURI* uri, + JS::HandleObject targetObj, const nsAString& charset, - nsIIOService* serv, bool reuseGlobal, - bool wantReturnValue, bool cache, + nsIIOService* serv, + bool wantReturnValue, + bool cache, JS::MutableHandleValue retval); nsresult DoLoadSubScriptWithOptions(const nsAString& url, From df181e287e71b307dc2cfc04421e7b19f7cb8a0c Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Wed, 17 May 2017 09:21:54 -0700 Subject: [PATCH 19/35] Bug 989373, part 5 - Eliminate |function| from subscript loader. r=kmag Thanks to the previous patch, we never set any of the function arguments, so they can be removed, and various code for running functions can be deleted. MozReview-Commit-ID: BTIIyDtBPMR --HG-- extra : rebase_source : 944adf3ac8f1579639e631a478fc286e980972ab --- js/xpconnect/loader/mozJSSubScriptLoader.cpp | 51 +++++++------------- js/xpconnect/loader/mozJSSubScriptLoader.h | 3 +- 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.cpp b/js/xpconnect/loader/mozJSSubScriptLoader.cpp index ccc762bc3e99..23b44cb93c3d 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp +++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp @@ -133,8 +133,7 @@ PrepareScript(nsIURI* uri, const char* buf, int64_t len, bool wantReturnValue, - MutableHandleScript script, - MutableHandleFunction function) + MutableHandleScript script) { JS::CompileOptions options(cx); options.setFileAndLine(uriStr, 1) @@ -177,30 +176,19 @@ EvalScript(JSContext* cx, nsIURI* uri, bool startupCache, bool preloadCache, - MutableHandleScript script, - HandleFunction function) + MutableHandleScript script) { - if (function) { - script.set(JS_GetFunctionScript(cx, function)); - } - - if (function) { - if (!JS_CallFunction(cx, targetObj, function, JS::HandleValueArray::empty(), retval)) { + if (JS_IsGlobalObject(targetObj)) { + if (!JS::CloneAndExecuteScript(cx, script, retval)) { return false; } } else { - if (JS_IsGlobalObject(targetObj)) { - if (!JS::CloneAndExecuteScript(cx, script, retval)) { - return false; - } - } else { - JS::AutoObjectVector envChain(cx); - if (!envChain.append(targetObj)) { - return false; - } - if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) { - return false; - } + JS::AutoObjectVector envChain(cx); + if (!envChain.append(targetObj)) { + return false; + } + if (!JS::CloneAndExecuteScript(cx, envChain, script, retval)) { + return false; } } @@ -373,7 +361,6 @@ AsyncScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader* aLoader, return NS_OK; } - RootedFunction function(cx); RootedScript script(cx); nsAutoCString spec; nsresult rv = uri->GetSpec(spec); @@ -383,7 +370,7 @@ AsyncScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader* aLoader, if (!PrepareScript(uri, cx, targetObj, spec.get(), mCharset, reinterpret_cast(aBuf), aLength, - mWantReturnValue, &script, &function)) + mWantReturnValue, &script)) { return NS_OK; } @@ -391,7 +378,7 @@ AsyncScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader* aLoader, JS::Rooted retval(cx); if (EvalScript(cx, targetObj, &retval, uri, mCache, mCache && !mWantReturnValue, - &script, function)) { + &script)) { autoPromise.ResolvePromise(retval); } @@ -467,11 +454,9 @@ mozJSSubScriptLoader::ReadScript(nsIURI* uri, const char* uriStr, nsIIOService* serv, bool wantReturnValue, - MutableHandleScript script, - MutableHandleFunction function) + MutableHandleScript script) { script.set(nullptr); - function.set(nullptr); // We create a channel and call SetContentType, to avoid expensive MIME type // lookups (bug 632490). @@ -517,7 +502,7 @@ mozJSSubScriptLoader::ReadScript(nsIURI* uri, return PrepareScript(uri, cx, targetObj, uriStr, charset, buf.get(), len, wantReturnValue, - script, function); + script); } NS_IMETHODIMP @@ -667,7 +652,6 @@ mozJSSubScriptLoader::DoLoadSubScriptWithOptions(const nsAString& url, cachePath.AppendPrintf("jssubloader/%d", version); PathifyURI(uri, cachePath); - RootedFunction function(cx); RootedScript script(cx); if (!options.ignoreCache) { if (!options.wantReturnValue) @@ -691,15 +675,14 @@ mozJSSubScriptLoader::DoLoadSubScriptWithOptions(const nsAString& url, // |back there. cache = nullptr; } else if (!ReadScript(uri, cx, targetObj, options.charset, - static_cast(uriStr.get()), serv, - options.wantReturnValue, &script, - &function)) { + static_cast(uriStr.get()), serv, + options.wantReturnValue, &script)) { return NS_OK; } Unused << EvalScript(cx, targetObj, retval, uri, !!cache, !ignoreCache && !options.wantReturnValue, - &script, function); + &script); return NS_OK; } diff --git a/js/xpconnect/loader/mozJSSubScriptLoader.h b/js/xpconnect/loader/mozJSSubScriptLoader.h index 061c628b448c..cce4797fc771 100644 --- a/js/xpconnect/loader/mozJSSubScriptLoader.h +++ b/js/xpconnect/loader/mozJSSubScriptLoader.h @@ -37,8 +37,7 @@ private: const nsAString& charset, const char* uriStr, nsIIOService* serv, bool wantReturnValue, - JS::MutableHandleScript script, - JS::MutableHandleFunction function); + JS::MutableHandleScript script); nsresult ReadScriptAsync(nsIURI* uri, JS::HandleObject targetObj, From 486eb7eb5acea0e66304ef4090e3dcd44ce5da32 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Thu, 18 May 2017 13:18:53 -0700 Subject: [PATCH 20/35] Bug 989373, part 6 - Rename |obj| to |thisObj| in PrepareObjectForLocation. r=kmag The name obj is not very descriptive, and a later patch will add another object to this method, so rename it to thisObj. thisObj is the object we set properties on for a particular .jsm. With global sharing, it will be different than the global. MozReview-Commit-ID: 9TPqdbXKYXO --HG-- extra : rebase_source : c1692bb4f2274f957e602d0e469a544ae9a97e6a --- js/xpconnect/loader/mozJSComponentLoader.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index 198774456bea..c1a84b727cd7 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -529,10 +529,14 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, } } - RootedObject obj(aCx, holder->GetJSObject()); - NS_ENSURE_TRUE(obj, nullptr); + // |thisObj| is the object we set properties on for a particular .jsm. + // XXX Right now, thisObj is always globalObj, but if we start + // sharing globals between jsms, they won't be the same. + // See bug 1186409. + RootedObject thisObj(aCx, holder->GetJSObject()); + NS_ENSURE_TRUE(thisObj, nullptr); - JSAutoCompartment ac(aCx, obj); + JSAutoCompartment ac(aCx, thisObj); *aRealFile = false; @@ -551,13 +555,13 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, if (XRE_IsParentProcess()) { RootedObject locationObj(aCx); - rv = nsXPConnect::XPConnect()->WrapNative(aCx, obj, aComponentFile, + rv = nsXPConnect::XPConnect()->WrapNative(aCx, thisObj, aComponentFile, NS_GET_IID(nsIFile), locationObj.address()); NS_ENSURE_SUCCESS(rv, nullptr); NS_ENSURE_TRUE(locationObj, nullptr); - if (!JS_DefineProperty(aCx, obj, "__LOCATION__", locationObj, 0)) + if (!JS_DefineProperty(aCx, thisObj, "__LOCATION__", locationObj, 0)) return nullptr; } } @@ -571,7 +575,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, RootedString exposedUri(aCx, JS_NewStringCopyN(aCx, nativePath.get(), nativePath.Length())); NS_ENSURE_TRUE(exposedUri, nullptr); - if (!JS_DefineProperty(aCx, obj, "__URI__", exposedUri, 0)) + if (!JS_DefineProperty(aCx, thisObj, "__URI__", exposedUri, 0)) return nullptr; if (createdNewGlobal) { @@ -583,7 +587,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, JS_FireOnNewGlobalObject(aes.cx(), global); } - return obj; + return thisObj; } nsresult From 016441faf027aa58c441b6034c3fdfc02b3fdcb7 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 15:46:13 -0700 Subject: [PATCH 21/35] Bug 989373, part 7 - Add new method to create a loader global. r=kmag This makes the code a little nicer to read, and means there will be less code churn if we later add back the ability to share globals. The holder also gets changed to an actual JS object. mLoaderGlobal is always null, but the simplification for that will be made in a later patch. MozReview-Commit-ID: 7Qg7JSgIxxm --HG-- extra : rebase_source : 204339b998501c96af35b407ba672a11204956dc --- js/xpconnect/loader/mozJSComponentLoader.cpp | 99 +++++++++++--------- js/xpconnect/loader/mozJSComponentLoader.h | 4 + 2 files changed, 59 insertions(+), 44 deletions(-) diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index c1a84b727cd7..eed053c640db 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -459,6 +459,53 @@ mozJSComponentLoader::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) return n; } +void +mozJSComponentLoader::CreateLoaderGlobal(JSContext* aCx, + JSAddonId* aAddonID, + MutableHandleObject aGlobal) +{ + RefPtr backstagePass; + nsresult rv = NS_NewBackstagePass(getter_AddRefs(backstagePass)); + NS_ENSURE_SUCCESS_VOID(rv); + + CompartmentOptions options; + + options.creationOptions() + .setSystemZone() + .setAddonId(aAddonID); + + options.behaviors().setVersion(JSVERSION_LATEST); + + if (xpc::SharedMemoryEnabled()) + options.creationOptions().setSharedMemoryAndAtomicsEnabled(true); + + // Defer firing OnNewGlobalObject until after the __URI__ property has + // been defined so the JS debugger can tell what module the global is + // for + nsCOMPtr holder; + rv = nsXPConnect::XPConnect()-> + InitClassesWithNewWrappedGlobal(aCx, + static_cast(backstagePass), + mSystemPrincipal, + nsIXPConnect::DONT_FIRE_ONNEWGLOBALHOOK, + options, + getter_AddRefs(holder)); + NS_ENSURE_SUCCESS_VOID(rv); + + RootedObject global(aCx, holder->GetJSObject()); + NS_ENSURE_TRUE_VOID(global); + + backstagePass->SetGlobalObject(global); + + JSAutoCompartment ac(aCx, global); + if (!JS_DefineFunctions(aCx, global, gGlobalFun) || + !JS_DefineProfilingFunctions(aCx, global)) { + return; + } + + aGlobal.set(global); +} + // Some stack based classes for cleaning up on early return class FileAutoCloser { @@ -484,56 +531,20 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, nsIURI* aURI, bool* aRealFile) { - nsCOMPtr holder; - nsresult rv = NS_OK; bool createdNewGlobal = false; + RootedObject globalObj(aCx); if (!mLoaderGlobal) { - RefPtr backstagePass; - rv = NS_NewBackstagePass(getter_AddRefs(backstagePass)); - NS_ENSURE_SUCCESS(rv, nullptr); - - CompartmentOptions options; - - options.creationOptions() - .setSystemZone() - .setAddonId(MapURIToAddonID(aURI)); - - options.behaviors().setVersion(JSVERSION_LATEST); - - if (xpc::SharedMemoryEnabled()) - options.creationOptions().setSharedMemoryAndAtomicsEnabled(true); - - // Defer firing OnNewGlobalObject until after the __URI__ property has - // been defined so the JS debugger can tell what module the global is - // for - rv = nsXPConnect::XPConnect()-> - InitClassesWithNewWrappedGlobal(aCx, - static_cast(backstagePass), - mSystemPrincipal, - nsIXPConnect::DONT_FIRE_ONNEWGLOBALHOOK, - options, - getter_AddRefs(holder)); - NS_ENSURE_SUCCESS(rv, nullptr); - createdNewGlobal = true; - - RootedObject global(aCx, holder->GetJSObject()); - NS_ENSURE_TRUE(global, nullptr); - - backstagePass->SetGlobalObject(global); - - JSAutoCompartment ac(aCx, global); - if (!JS_DefineFunctions(aCx, global, gGlobalFun) || - !JS_DefineProfilingFunctions(aCx, global)) { - return nullptr; - } + CreateLoaderGlobal(aCx, MapURIToAddonID(aURI), &globalObj); + if (globalObj) + createdNewGlobal = true; } // |thisObj| is the object we set properties on for a particular .jsm. // XXX Right now, thisObj is always globalObj, but if we start // sharing globals between jsms, they won't be the same. // See bug 1186409. - RootedObject thisObj(aCx, holder->GetJSObject()); + RootedObject thisObj(aCx, globalObj); NS_ENSURE_TRUE(thisObj, nullptr); JSAutoCompartment ac(aCx, thisObj); @@ -543,6 +554,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, // need to be extra careful checking for URIs pointing to files // EnsureFile may not always get called, especially on resource URIs // so we need to call GetFile to make sure this is a valid file + nsresult rv = NS_OK; nsCOMPtr fileURL = do_QueryInterface(aURI, &rv); nsCOMPtr testFile; if (NS_SUCCEEDED(rv)) { @@ -581,10 +593,9 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, if (createdNewGlobal) { // AutoEntryScript required to invoke debugger hook, which is a // Gecko-specific concept at present. - dom::AutoEntryScript aes(holder->GetJSObject(), + dom::AutoEntryScript aes(globalObj, "component loader report global"); - RootedObject global(aes.cx(), holder->GetJSObject()); - JS_FireOnNewGlobalObject(aes.cx(), global); + JS_FireOnNewGlobalObject(aes.cx(), globalObj); } return thisObj; diff --git a/js/xpconnect/loader/mozJSComponentLoader.h b/js/xpconnect/loader/mozJSComponentLoader.h index 02ccba809bb6..0af2e4a5c4e2 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.h +++ b/js/xpconnect/loader/mozJSComponentLoader.h @@ -62,6 +62,10 @@ class mozJSComponentLoader : public mozilla::ModuleLoader, nsresult ReallyInit(); void UnloadModules(); + void CreateLoaderGlobal(JSContext* aCx, + JSAddonId* aAddonID, + JS::MutableHandleObject aGlobal); + JSObject* PrepareObjectForLocation(JSContext* aCx, nsIFile* aComponentFile, nsIURI* aComponent, From 1ed03a415f91f9228d13092b67799399859389b6 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 15 May 2017 15:51:20 -0700 Subject: [PATCH 22/35] Bug 989373, part 8 - mLoaderGlobal is always null. r=kmag This field can be eliminated for now. MozReview-Commit-ID: 9xyxoTwBfXU --HG-- extra : rebase_source : e71660452286d383ba9738e7c0f7e09ae134a01e --- js/xpconnect/loader/mozJSComponentLoader.cpp | 9 ++------- js/xpconnect/loader/mozJSComponentLoader.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index eed053c640db..a0837ab7c37c 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -531,14 +531,9 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, nsIURI* aURI, bool* aRealFile) { - bool createdNewGlobal = false; RootedObject globalObj(aCx); - if (!mLoaderGlobal) { - CreateLoaderGlobal(aCx, MapURIToAddonID(aURI), &globalObj); - if (globalObj) - createdNewGlobal = true; - } + CreateLoaderGlobal(aCx, MapURIToAddonID(aURI), &globalObj); // |thisObj| is the object we set properties on for a particular .jsm. // XXX Right now, thisObj is always globalObj, but if we start @@ -590,7 +585,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx, if (!JS_DefineProperty(aCx, thisObj, "__URI__", exposedUri, 0)) return nullptr; - if (createdNewGlobal) { + { // AutoEntryScript required to invoke debugger hook, which is a // Gecko-specific concept at present. dom::AutoEntryScript aes(globalObj, diff --git a/js/xpconnect/loader/mozJSComponentLoader.h b/js/xpconnect/loader/mozJSComponentLoader.h index 0af2e4a5c4e2..a74def2b7371 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.h +++ b/js/xpconnect/loader/mozJSComponentLoader.h @@ -86,7 +86,6 @@ class mozJSComponentLoader : public mozilla::ModuleLoader, nsCOMPtr mCompMgr; nsCOMPtr mSystemPrincipal; - nsCOMPtr mLoaderGlobal; class ModuleEntry : public mozilla::Module { From ad7f3e6ef31a0f368d09f9cc664c64ea85053fad Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sun, 21 May 2017 12:55:08 -0700 Subject: [PATCH 23/35] Backed out changeset dd3a293cf053 (bug 1366247) for making Stylo build, but not run MozReview-Commit-ID: JcbwZSt05cN --- layout/style/ServoBindingList.h | 4 ++-- layout/style/ServoBindings.cpp | 5 ++--- layout/style/ServoBindings.h | 3 ++- layout/style/ServoBindings.toml | 3 +-- layout/style/ServoKeyframesRule.cpp | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 151b42ec6778..1d1c7e116330 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -153,9 +153,9 @@ SERVO_BINDING_FUNC(Servo_Keyframe_SetStyle, void, RawServoDeclarationBlockBorrowed declarations) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetName, nsIAtom*, RawServoKeyframesRuleBorrowed rule) +// This method takes an addrefed nsIAtom. SERVO_BINDING_FUNC(Servo_KeyframesRule_SetName, void, - RawServoKeyframesRuleBorrowed rule, - already_AddRefed name) + RawServoKeyframesRuleBorrowed rule, nsIAtom* name) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetCount, uint32_t, RawServoKeyframesRuleBorrowed rule) SERVO_BINDING_FUNC(Servo_KeyframesRule_GetKeyframe, RawServoKeyframeStrong, diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index ac8971bec59b..defef6408591 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -1849,10 +1849,9 @@ Gecko_CSSValue_SetStringFromAtom(nsCSSValueBorrowedMut aCSSValue, } void -Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut aCSSValue, - already_AddRefed aAtom) +Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut aCSSValue, nsIAtom* aAtom) { - aCSSValue->SetAtomIdentValue(Move(aAtom)); + aCSSValue->SetAtomIdentValue(already_AddRefed(aAtom)); } void diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index 45fb8fa27ce5..f866b2d60ffa 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -476,7 +476,8 @@ void Gecko_CSSValue_SetString(nsCSSValueBorrowedMut css_value, const uint8_t* string, uint32_t len, nsCSSUnit unit); void Gecko_CSSValue_SetStringFromAtom(nsCSSValueBorrowedMut css_value, nsIAtom* atom, nsCSSUnit unit); -void Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut css_value, already_AddRefed atom); +// Take an addrefed nsIAtom and set it to the nsCSSValue +void Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut css_value, nsIAtom* atom); void Gecko_CSSValue_SetArray(nsCSSValueBorrowedMut css_value, int32_t len); void Gecko_CSSValue_SetURL(nsCSSValueBorrowedMut css_value, ServoBundledURI uri); void Gecko_CSSValue_SetInt(nsCSSValueBorrowedMut css_value, int32_t integer, nsCSSUnit unit); diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index 03d0e71cd104..30caf64c8453 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -304,6 +304,7 @@ hide-types = [ ] raw-lines = [ "pub use nsstring::{nsACString, nsAString, nsString, nsStringRepr};", + "use gecko_bindings::structs::nsTArray;", "type nsACString_internal = nsACString;", "type nsAString_internal = nsAString;", ] @@ -313,7 +314,6 @@ structs-types = [ "mozilla::css::ImageValue", "mozilla::css::URLValue", "mozilla::Side", - "already_AddRefed", "RawGeckoAnimationPropertySegment", "RawGeckoComputedTiming", "RawGeckoCSSPropertyIDList", @@ -410,7 +410,6 @@ structs-types = [ "nsStyleVariables", "nsStyleVisibility", "nsStyleXUL", - "nsTArray", "nsTimingFunction", "nscolor", "nscoord", diff --git a/layout/style/ServoKeyframesRule.cpp b/layout/style/ServoKeyframesRule.cpp index 990729efc9d5..05b123d66ced 100644 --- a/layout/style/ServoKeyframesRule.cpp +++ b/layout/style/ServoKeyframesRule.cpp @@ -261,7 +261,7 @@ ServoKeyframesRule::SetName(const nsAString& aName) } UpdateRule([this, &name]() { - Servo_KeyframesRule_SetName(mRawRule, name.forget()); + Servo_KeyframesRule_SetName(mRawRule, name.forget().take()); }); return NS_OK; } From 2e8bf492d5d6982adbc4482e297113d23f213a3d Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Mon, 15 May 2017 18:53:13 +0200 Subject: [PATCH 24/35] Bug 1363533 - Introduce MOZ_DEVTOOLS=addon to allow building Firefox without DevTools. r=gps,jdescottes,jryans MozReview-Commit-ID: Ljm33fuvE2T --HG-- extra : rebase_source : 438b6d8ada33e965c9534bf1ef77409c4c015470 --- devtools/moz.build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/devtools/moz.build b/devtools/moz.build index f988fd50dea9..5f7ee942e083 100644 --- a/devtools/moz.build +++ b/devtools/moz.build @@ -4,7 +4,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -if CONFIG['MOZ_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server'): +if CONFIG['MOZ_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server', 'addon'): error('Unsupported MOZ_DEVTOOLS value: %s' % (CONFIG['MOZ_DEVTOOLS'])) if CONFIG['MOZ_DEVTOOLS'] == 'all': @@ -12,12 +12,19 @@ if CONFIG['MOZ_DEVTOOLS'] == 'all': 'client', ] +# `addon` is a special build mode to strip everything except binary components +# and shim modules that are going to stay in Firefox once DevTools ship as an +# add-on. DIRS += [ - 'server', - 'shared', 'shim', ] +if CONFIG['MOZ_DEVTOOLS'] != 'addon': + DIRS += [ + 'server', + 'shared', + ] + # /browser uses DIST_SUBDIR. We opt-in to this treatment when building # DevTools for the browser to keep the root omni.ja slim for use by external XUL # apps. Mulet also uses this since it includes /browser. From 51fbee878f00db1255452d9aad418deff69ab04c Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Mon, 15 May 2017 18:53:19 +0200 Subject: [PATCH 25/35] Bug 1363533 - Move nsIJSInspector from devtools/server/ to devtools/platform/. r=gps,jryans MozReview-Commit-ID: 3ry7pRiqNWv --HG-- rename : devtools/server/moz.build => devtools/platform/moz.build rename : devtools/server/nsIJSInspector.idl => devtools/platform/nsIJSInspector.idl rename : devtools/server/nsJSInspector.cpp => devtools/platform/nsJSInspector.cpp rename : devtools/server/nsJSInspector.h => devtools/platform/nsJSInspector.h rename : devtools/server/tests/unit/test_nsjsinspector.js => devtools/platform/tests/unit/test_nsjsinspector.js extra : rebase_source : 1df23f9247d9202fc7022ae73f8bf4bcf262410b --- build/dumbmake-dependencies | 1 + devtools/moz.build | 2 ++ devtools/platform/moz.build | 19 +++++++++++++++++++ .../{server => platform}/nsIJSInspector.idl | 0 .../{server => platform}/nsJSInspector.cpp | 0 devtools/{server => platform}/nsJSInspector.h | 0 devtools/platform/tests/unit/.eslintrc.js | 19 +++++++++++++++++++ .../tests/unit/test_nsjsinspector.js | 4 ++++ devtools/platform/tests/unit/xpcshell.ini | 6 ++++++ devtools/server/moz.build | 12 ------------ devtools/server/tests/unit/xpcshell.ini | 1 - 11 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 devtools/platform/moz.build rename devtools/{server => platform}/nsIJSInspector.idl (100%) rename devtools/{server => platform}/nsJSInspector.cpp (100%) rename devtools/{server => platform}/nsJSInspector.h (100%) create mode 100644 devtools/platform/tests/unit/.eslintrc.js rename devtools/{server => platform}/tests/unit/test_nsjsinspector.js (96%) create mode 100644 devtools/platform/tests/unit/xpcshell.ini diff --git a/build/dumbmake-dependencies b/build/dumbmake-dependencies index d99f56757c0e..87f43a9fb497 100644 --- a/build/dumbmake-dependencies +++ b/build/dumbmake-dependencies @@ -48,6 +48,7 @@ toolkit/library profile services startupcache + devtools/platform devtools/server devtools/shared browser/app diff --git a/devtools/moz.build b/devtools/moz.build index 5f7ee942e083..6367a0eb7928 100644 --- a/devtools/moz.build +++ b/devtools/moz.build @@ -15,8 +15,10 @@ if CONFIG['MOZ_DEVTOOLS'] == 'all': # `addon` is a special build mode to strip everything except binary components # and shim modules that are going to stay in Firefox once DevTools ship as an # add-on. +# `platform` contains all native components DIRS += [ 'shim', + 'platform', ] if CONFIG['MOZ_DEVTOOLS'] != 'addon': diff --git a/devtools/platform/moz.build b/devtools/platform/moz.build new file mode 100644 index 000000000000..5aad20065ea7 --- /dev/null +++ b/devtools/platform/moz.build @@ -0,0 +1,19 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] + +XPIDL_SOURCES += [ + 'nsIJSInspector.idl', +] + +XPIDL_MODULE = 'jsinspector' + +SOURCES += [ + 'nsJSInspector.cpp', +] + +FINAL_LIBRARY = 'xul' diff --git a/devtools/server/nsIJSInspector.idl b/devtools/platform/nsIJSInspector.idl similarity index 100% rename from devtools/server/nsIJSInspector.idl rename to devtools/platform/nsIJSInspector.idl diff --git a/devtools/server/nsJSInspector.cpp b/devtools/platform/nsJSInspector.cpp similarity index 100% rename from devtools/server/nsJSInspector.cpp rename to devtools/platform/nsJSInspector.cpp diff --git a/devtools/server/nsJSInspector.h b/devtools/platform/nsJSInspector.h similarity index 100% rename from devtools/server/nsJSInspector.h rename to devtools/platform/nsJSInspector.h diff --git a/devtools/platform/tests/unit/.eslintrc.js b/devtools/platform/tests/unit/.eslintrc.js new file mode 100644 index 000000000000..e97bd8835e30 --- /dev/null +++ b/devtools/platform/tests/unit/.eslintrc.js @@ -0,0 +1,19 @@ +// Parent config file for all devtools xpcshell files. +module.exports = { + "extends": [ + "plugin:mozilla/xpcshell-test" + ], + "rules": { + // Allow non-camelcase so that run_test doesn't produce a warning. + "camelcase": "off", + // Allow using undefined variables so that tests can refer to functions + // and variables defined in head.js files, without having to maintain a + // list of globals in each .eslintrc file. + // Note that bug 1168340 will eventually help auto-registering globals + // from head.js files. + "no-undef": "off", + "block-scoped-var": "off", + // Tests can always import anything. + "mozilla/reject-some-requires": "off", + } +} diff --git a/devtools/server/tests/unit/test_nsjsinspector.js b/devtools/platform/tests/unit/test_nsjsinspector.js similarity index 96% rename from devtools/server/tests/unit/test_nsjsinspector.js rename to devtools/platform/tests/unit/test_nsjsinspector.js index 101912de9217..c4215f7250b9 100644 --- a/devtools/server/tests/unit/test_nsjsinspector.js +++ b/devtools/platform/tests/unit/test_nsjsinspector.js @@ -3,9 +3,13 @@ "use strict"; +const Cc = Components.classes; +const Ci = Components.interfaces; + // Test the basic functionality of the nsIJSInspector component. var gCount = 0; const MAX = 10; + var inspector = Cc["@mozilla.org/jsinspector;1"].getService(Ci.nsIJSInspector); var tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager); diff --git a/devtools/platform/tests/unit/xpcshell.ini b/devtools/platform/tests/unit/xpcshell.ini new file mode 100644 index 000000000000..91430971a75f --- /dev/null +++ b/devtools/platform/tests/unit/xpcshell.ini @@ -0,0 +1,6 @@ +[DEFAULT] +tags = devtools +firefox-appdir = browser +skip-if = toolkit == 'android' + +[test_nsjsinspector.js] diff --git a/devtools/server/moz.build b/devtools/server/moz.build index 69f4698c35c6..2bbf6935f869 100644 --- a/devtools/server/moz.build +++ b/devtools/server/moz.build @@ -16,18 +16,6 @@ BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini'] MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] -XPIDL_SOURCES += [ - 'nsIJSInspector.idl', -] - -XPIDL_MODULE = 'jsinspector' - -SOURCES += [ - 'nsJSInspector.cpp', -] - -FINAL_LIBRARY = 'xul' - DevToolsModules( 'child.js', 'content-server.jsm', diff --git a/devtools/server/tests/unit/xpcshell.ini b/devtools/server/tests/unit/xpcshell.ini index 5a0f97356378..53460ee9e5a5 100644 --- a/devtools/server/tests/unit/xpcshell.ini +++ b/devtools/server/tests/unit/xpcshell.ini @@ -43,7 +43,6 @@ support-files = [test_nesting-03.js] [test_forwardingprefix.js] [test_getyoungestframe.js] -[test_nsjsinspector.js] [test_dbgactor.js] [test_dbgglobal.js] [test_dbgclient_debuggerstatement.js] From ba3c4ab793f0809c7e6086e6ca26957c3fb6e42e Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Sun, 21 May 2017 14:09:52 -0500 Subject: [PATCH 26/35] servo: Merge #16956 - stylo: Use correct counts when copying from image layers (from mbrubeck:cleanup); r=Manishearth --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are code cleanup. Source-Repo: https://github.com/servo/servo Source-Revision: 460c90af8d028fac341a8d3b274fba591441dc32 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 7ea9540f673ac6b87e5d9f8577239adcc74e803b --- .../components/style/properties/gecko.mako.rs | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/servo/components/style/properties/gecko.mako.rs b/servo/components/style/properties/gecko.mako.rs index 0736d34e97e0..0fb75af9d318 100644 --- a/servo/components/style/properties/gecko.mako.rs +++ b/servo/components/style/properties/gecko.mako.rs @@ -2769,19 +2769,18 @@ fn static_assert() { pub fn copy_${shorthand}_${name}_from(&mut self, other: &Self) { use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType; + let count = other.gecko.${image_layers_field}.${field_name}Count; unsafe { Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field}, - other.gecko.${image_layers_field}.mLayers.len(), + count as usize, LayerType::${shorthand.title()}); } for (layer, other) in self.gecko.${image_layers_field}.mLayers.iter_mut() .zip(other.gecko.${image_layers_field}.mLayers.iter()) - .take(other.gecko.${image_layers_field} - .${field_name}Count as usize) { + .take(count as usize) { layer.${field_name} = other.${field_name}; } - self.gecko.${image_layers_field}.${field_name}Count = - other.gecko.${image_layers_field}.${field_name}Count; + self.gecko.${image_layers_field}.${field_name}Count = count; } @@ -2874,23 +2873,21 @@ fn static_assert() { pub fn copy_${shorthand}_position_${orientation}_from(&mut self, other: &Self) { use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType; - self.gecko.${image_layers_field}.mPosition${orientation.upper()}Count - = cmp::min(1, other.gecko.${image_layers_field}.mPosition${orientation.upper()}Count); - self.gecko.${image_layers_field}.mLayers.mFirstElement.mPosition = - other.gecko.${image_layers_field}.mLayers.mFirstElement.mPosition; + let count = other.gecko.${image_layers_field}.mPosition${orientation.upper()}Count; + unsafe { Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field}, - other.gecko.${image_layers_field}.mLayers.len(), + count as usize, LayerType::${shorthand.capitalize()}); } for (layer, other) in self.gecko.${image_layers_field}.mLayers.iter_mut() - .zip(other.gecko.${image_layers_field}.mLayers.iter()) { + .zip(other.gecko.${image_layers_field}.mLayers.iter()) + .take(count as usize) { layer.mPosition.m${orientation.upper()}Position = other.mPosition.m${orientation.upper()}Position; } - self.gecko.${image_layers_field}.mPosition${orientation.upper()}Count - = other.gecko.${image_layers_field}.mPosition${orientation.upper()}Count; + self.gecko.${image_layers_field}.mPosition${orientation.upper()}Count = count; } pub fn clone_${shorthand}_position_${orientation}(&self) From d8a29909d411f6a342c6ea80d9ea43cac31e3cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2017 15:40:41 -0500 Subject: [PATCH 27/35] servo: Merge #16988 - Revert "Auto merge of #16976 - upsuper:bug1366247, r=nox" for breaking the world (from emilio:backout); r=emilio This reverts commit 3d40b516c8ac6e946cadace2378581cbac7b1e1b, reversing changes made to 255387a915ef83db6b11d976f89c10b518c97487. Source-Repo: https://github.com/servo/servo Source-Revision: d40b26202db6b194472100d97b5398a73aa1dacc --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 81744c9d48bb683afd0c1cf11d3a74f2005d9e42 --- .../style/gecko/generated/bindings.rs | 7 ++- servo/components/style/gecko/wrapper.rs | 7 ++- .../gecko_bindings/sugar/already_addrefed.rs | 48 ------------------- .../style/gecko_bindings/sugar/mod.rs | 1 - .../gecko_bindings/sugar/ns_css_value.rs | 2 +- .../style/gecko_string_cache/mod.rs | 36 +++++++------- servo/ports/geckolib/glue.rs | 6 +-- 7 files changed, 28 insertions(+), 79 deletions(-) delete mode 100644 servo/components/style/gecko_bindings/sugar/already_addrefed.rs diff --git a/servo/components/style/gecko/generated/bindings.rs b/servo/components/style/gecko/generated/bindings.rs index 2987408705d1..c88d389bd3b4 100644 --- a/servo/components/style/gecko/generated/bindings.rs +++ b/servo/components/style/gecko/generated/bindings.rs @@ -1,13 +1,13 @@ /* automatically generated by rust-bindgen */ pub use nsstring::{nsACString, nsAString, nsString, nsStringRepr}; +use gecko_bindings::structs::nsTArray; type nsACString_internal = nsACString; type nsAString_internal = nsAString; use gecko_bindings::structs::mozilla::css::GridTemplateAreasValue; use gecko_bindings::structs::mozilla::css::ImageValue; use gecko_bindings::structs::mozilla::css::URLValue; use gecko_bindings::structs::mozilla::Side; -use gecko_bindings::structs::already_AddRefed; use gecko_bindings::structs::RawGeckoAnimationPropertySegment; use gecko_bindings::structs::RawGeckoComputedTiming; use gecko_bindings::structs::RawGeckoCSSPropertyIDList; @@ -190,7 +190,6 @@ unsafe impl Sync for nsStyleVisibility {} use gecko_bindings::structs::nsStyleXUL; unsafe impl Send for nsStyleXUL {} unsafe impl Sync for nsStyleXUL {} -use gecko_bindings::structs::nsTArray; use gecko_bindings::structs::nsTimingFunction; use gecko_bindings::structs::nscolor; use gecko_bindings::structs::nscoord; @@ -1238,7 +1237,7 @@ extern "C" { } extern "C" { pub fn Gecko_CSSValue_SetAtomIdent(css_value: nsCSSValueBorrowedMut, - atom: already_AddRefed); + atom: *mut nsIAtom); } extern "C" { pub fn Gecko_CSSValue_SetArray(css_value: nsCSSValueBorrowedMut, @@ -1982,7 +1981,7 @@ extern "C" { } extern "C" { pub fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, - name: already_AddRefed); + name: *mut nsIAtom); } extern "C" { pub fn Servo_KeyframesRule_GetCount(rule: RawServoKeyframesRuleBorrowed) diff --git a/servo/components/style/gecko/wrapper.rs b/servo/components/style/gecko/wrapper.rs index 71e26e104a45..e043ff572232 100644 --- a/servo/components/style/gecko/wrapper.rs +++ b/servo/components/style/gecko/wrapper.rs @@ -54,7 +54,6 @@ use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT; use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel; use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS; -use gecko_bindings::structs::already_AddRefed; use gecko_bindings::sugar::ownership::HasArcFFI; use logical_geometry::WritingMode; use media_queries::Device; @@ -1075,13 +1074,13 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> { // // http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#language let ptr = unsafe { - already_AddRefed::new(bindings::Gecko_GetXMLLangValue(self.0)) + bindings::Gecko_GetXMLLangValue(self.0) }; - if let Some(ptr) = ptr { + if !ptr.is_null() { let global_style_data = &*GLOBAL_STYLE_DATA; let pdb = PropertyDeclarationBlock::with_one( - PropertyDeclaration::XLang(SpecifiedLang(ptr.into())), + PropertyDeclaration::XLang(SpecifiedLang(unsafe { Atom::from_addrefed(ptr) })), Importance::Normal ); let arc = Arc::new(global_style_data.shared_lock.wrap(pdb)); diff --git a/servo/components/style/gecko_bindings/sugar/already_addrefed.rs b/servo/components/style/gecko_bindings/sugar/already_addrefed.rs deleted file mode 100644 index 01e209fc81f2..000000000000 --- a/servo/components/style/gecko_bindings/sugar/already_addrefed.rs +++ /dev/null @@ -1,48 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -//! little helpers for `already_AddRefed`. - -use gecko_bindings::structs::already_AddRefed; -use std::marker::PhantomData; -use std::mem; - -impl already_AddRefed { - /// Create an already_AddRefed from an addrefed pointer. - #[inline] - pub unsafe fn new(ptr: *mut T) -> Option { - if !ptr.is_null() { - Some(Self::new_unchecked(ptr)) - } else { - None - } - } - - /// Create an already_AddRefed from an non-nullable addrefed pointer. - #[inline] - pub unsafe fn new_unchecked(ptr: *mut T) -> Self { - debug_assert!(!ptr.is_null()); - already_AddRefed { - mRawPtr: ptr, - _phantom_0: PhantomData, - } - } - - /// Take the addrefed pointer from this struct. - #[inline] - pub fn take(self) -> *mut T { - let ptr = self.mRawPtr; - mem::forget(self); - ptr - } -} - -#[cfg(debug_assertions)] -impl Drop for already_AddRefed { - fn drop(&mut self) { - // We really should instead mark already_AddRefed must_use, but - // we cannot currently, which is servo/rust-bindgen#710. - unreachable!("Destructor shouldn't be called, otherwise we are leaking") - } -} diff --git a/servo/components/style/gecko_bindings/sugar/mod.rs b/servo/components/style/gecko_bindings/sugar/mod.rs index 112a8d8e4fa3..f241c94810b0 100644 --- a/servo/components/style/gecko_bindings/sugar/mod.rs +++ b/servo/components/style/gecko_bindings/sugar/mod.rs @@ -4,7 +4,6 @@ //! Rust sugar and convenience methods for Gecko types. -mod already_addrefed; mod ns_com_ptr; mod ns_compatibility; mod ns_css_shadow_array; diff --git a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs index 13c3c5a825c5..0f91fc4f27a4 100644 --- a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs +++ b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs @@ -152,7 +152,7 @@ impl nsCSSValue { /// Set to an atom identifier value pub fn set_atom_ident(&mut self, s: Atom) { - unsafe { bindings::Gecko_CSSValue_SetAtomIdent(self, s.into()) } + unsafe { bindings::Gecko_CSSValue_SetAtomIdent(self, s.into_addrefed()) } } /// Set to a font format diff --git a/servo/components/style/gecko_string_cache/mod.rs b/servo/components/style/gecko_string_cache/mod.rs index 08933c053ff4..fa89f5eab48d 100644 --- a/servo/components/style/gecko_string_cache/mod.rs +++ b/servo/components/style/gecko_string_cache/mod.rs @@ -10,7 +10,7 @@ use gecko_bindings::bindings::Gecko_AddRefAtom; use gecko_bindings::bindings::Gecko_Atomize; use gecko_bindings::bindings::Gecko_Atomize16; use gecko_bindings::bindings::Gecko_ReleaseAtom; -use gecko_bindings::structs::{already_AddRefed, nsIAtom}; +use gecko_bindings::structs::nsIAtom; use nsstring::nsAString; use precomputed_hash::PrecomputedHash; use std::ascii::AsciiExt; @@ -219,6 +219,24 @@ impl Atom { atom } + /// Creates an atom from a dynamic atom pointer that has already had AddRef + /// called on it. + #[inline] + pub unsafe fn from_addrefed(ptr: *mut nsIAtom) -> Self { + debug_assert!(!ptr.is_null()); + unsafe { + Atom(WeakAtom::new(ptr)) + } + } + + /// Convert this atom into an addrefed nsIAtom pointer. + #[inline] + pub fn into_addrefed(self) -> *mut nsIAtom { + let ptr = self.as_ptr(); + mem::forget(self); + ptr + } + /// Return whether two atoms are ASCII-case-insensitive matches pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool { let a = self.as_slice(); @@ -340,19 +358,3 @@ impl From<*mut nsIAtom> for Atom { } } } - -impl From> for Atom { - #[inline] - fn from(ptr: already_AddRefed) -> Atom { - unsafe { Atom(WeakAtom::new(ptr.take())) } - } -} - -impl From for already_AddRefed { - #[inline] - fn from(atom: Atom) -> already_AddRefed { - let ptr = atom.as_ptr(); - mem::forget(atom); - unsafe { already_AddRefed::new_unchecked(ptr) } - } -} diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index 55c031351c84..bc4db3e7204a 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -72,7 +72,6 @@ use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; use style::gecko_bindings::structs::ServoElementSnapshotTable; use style::gecko_bindings::structs::URLExtraData; -use style::gecko_bindings::structs::already_AddRefed; use style::gecko_bindings::structs::nsCSSValueSharedList; use style::gecko_bindings::structs::nsCompatibility; use style::gecko_bindings::structs::nsresult; @@ -1006,10 +1005,9 @@ pub extern "C" fn Servo_KeyframesRule_GetName(rule: RawServoKeyframesRuleBorrowe } #[no_mangle] -pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, - name: already_AddRefed) { +pub extern "C" fn Servo_KeyframesRule_SetName(rule: RawServoKeyframesRuleBorrowed, name: *mut nsIAtom) { write_locked_arc(rule, |rule: &mut KeyframesRule| { - rule.name = KeyframesName::Ident(CustomIdent(name.into())); + rule.name = KeyframesName::Ident(CustomIdent(unsafe { Atom::from_addrefed(name) })); }) } From 2f7721fac147503547f3c7a0a1b65e6f92aee350 Mon Sep 17 00:00:00 2001 From: Bryce Van Dyk Date: Mon, 1 May 2017 14:29:46 +1200 Subject: [PATCH 28/35] Bug 1354457 - Stop video frames being forwarded for direct connections when recorder is suspended. r=pehrsons MozReview-Commit-ID: 7J6oQf7qn4u --HG-- extra : rebase_source : 6cd2959d01de8c07cbf11c826b43c013dc730e46 --- dom/media/encoder/MediaEncoder.cpp | 5 ++++- dom/media/encoder/MediaEncoder.h | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dom/media/encoder/MediaEncoder.cpp b/dom/media/encoder/MediaEncoder.cpp index 82b4b86aab92..747039d04ea3 100644 --- a/dom/media/encoder/MediaEncoder.cpp +++ b/dom/media/encoder/MediaEncoder.cpp @@ -33,7 +33,10 @@ void MediaStreamVideoRecorderSink::SetCurrentFrames(const VideoSegment& aSegment) { MOZ_ASSERT(mVideoEncoder); - mVideoEncoder->SetCurrentFrames(aSegment); + // If we're suspended (paused) we don't forward frames + if (!mSuspended) { + mVideoEncoder->SetCurrentFrames(aSegment); + } } void diff --git a/dom/media/encoder/MediaEncoder.h b/dom/media/encoder/MediaEncoder.h index 41d7e71e2e96..2ebceb035d34 100644 --- a/dom/media/encoder/MediaEncoder.h +++ b/dom/media/encoder/MediaEncoder.h @@ -24,15 +24,20 @@ class MediaStreamVideoRecorderSink : public MediaStreamVideoSink { public: explicit MediaStreamVideoRecorderSink(VideoTrackEncoder* aEncoder) - : mVideoEncoder(aEncoder) {} + : mVideoEncoder(aEncoder) + , mSuspended(false) {} // MediaStreamVideoSink methods virtual void SetCurrentFrames(const VideoSegment& aSegment) override; virtual void ClearFrames() override {} + void Resume() { mSuspended = false; } + void Suspend() { mSuspended = true; } + private: virtual ~MediaStreamVideoRecorderSink() {} VideoTrackEncoder* mVideoEncoder; + Atomic mSuspended; }; /** @@ -111,7 +116,9 @@ public : /* Note - called from control code, not on MSG threads. */ void Suspend() { + MOZ_ASSERT(NS_IsMainThread()); mSuspended = RECORD_SUSPENDED; + mVideoSink->Suspend(); } /** @@ -120,9 +127,11 @@ public : * to the next frame, in order to avoid any possible loss of sync. */ void Resume() { + MOZ_ASSERT(NS_IsMainThread()); if (mSuspended == RECORD_SUSPENDED) { mSuspended = RECORD_RESUMED; } + mVideoSink->Resume(); } /** From a5678a3a438a072473d89be5c8ba18b682e741c5 Mon Sep 17 00:00:00 2001 From: Bryce Van Dyk Date: Fri, 5 May 2017 15:12:03 +1200 Subject: [PATCH 29/35] Bug 1354457 - Remove old suspend logic from media encoder. r=pehrsons The switch from duration to time stamp based samples has removed the need for this logic. MozReview-Commit-ID: 7J6oQf7qn4u --HG-- extra : rebase_source : 5ab566c03c4af0ab1067e814fdd51fa8879e95f1 --- dom/media/encoder/MediaEncoder.cpp | 53 +++++++++--------------------- dom/media/encoder/MediaEncoder.h | 14 ++------ 2 files changed, 18 insertions(+), 49 deletions(-) diff --git a/dom/media/encoder/MediaEncoder.cpp b/dom/media/encoder/MediaEncoder.cpp index 747039d04ea3..dfb794d5f96c 100644 --- a/dom/media/encoder/MediaEncoder.cpp +++ b/dom/media/encoder/MediaEncoder.cpp @@ -52,20 +52,21 @@ MediaEncoder::NotifyRealtimeData(MediaStreamGraph* aGraph, uint32_t aTrackEvents, const MediaSegment& aRealtimeMedia) { - if (mSuspended == RECORD_NOT_SUSPENDED) { - // Process the incoming raw track data from MediaStreamGraph, called on the - // thread of MediaStreamGraph. - if (mAudioEncoder && aRealtimeMedia.GetType() == MediaSegment::AUDIO) { - mAudioEncoder->NotifyQueuedTrackChanges(aGraph, aID, - aTrackOffset, aTrackEvents, - aRealtimeMedia); - } else if (mVideoEncoder && - aRealtimeMedia.GetType() == MediaSegment::VIDEO && - aTrackEvents != TrackEventCommand::TRACK_EVENT_NONE) { - mVideoEncoder->NotifyQueuedTrackChanges(aGraph, aID, - aTrackOffset, aTrackEvents, - aRealtimeMedia); - } + if (mSuspended) { + return; + } + // Process the incoming raw track data from MediaStreamGraph, called on the + // thread of MediaStreamGraph. + if (mAudioEncoder && aRealtimeMedia.GetType() == MediaSegment::AUDIO) { + mAudioEncoder->NotifyQueuedTrackChanges(aGraph, aID, + aTrackOffset, aTrackEvents, + aRealtimeMedia); + } else if (mVideoEncoder && + aRealtimeMedia.GetType() == MediaSegment::VIDEO && + aTrackEvents != TrackEventCommand::TRACK_EVENT_NONE) { + mVideoEncoder->NotifyQueuedTrackChanges(aGraph, aID, + aTrackOffset, aTrackEvents, + aRealtimeMedia); } } @@ -91,24 +92,6 @@ MediaEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, NotifyRealtimeData(aGraph, aID, aTrackOffset, aTrackEvents, segment); } } - if (mSuspended == RECORD_RESUMED) { - if (mVideoEncoder) { - if (aQueuedMedia.GetType() == MediaSegment::VIDEO) { - // insert a null frame of duration equal to the first segment passed - // after Resume(), so it'll get added to one of the DirectListener frames - VideoSegment segment; - gfx::IntSize size(0,0); - segment.AppendFrame(nullptr, aQueuedMedia.GetDuration(), size, - PRINCIPAL_HANDLE_NONE); - mVideoEncoder->NotifyQueuedTrackChanges(aGraph, aID, - aTrackOffset, aTrackEvents, - segment); - mSuspended = RECORD_NOT_SUSPENDED; - } - } else { - mSuspended = RECORD_NOT_SUSPENDED; // no video - } - } } } @@ -121,12 +104,6 @@ MediaEncoder::NotifyQueuedAudioData(MediaStreamGraph* aGraph, TrackID aID, { if (!mDirectConnected) { NotifyRealtimeData(aGraph, aID, aTrackOffset, 0, aQueuedMedia); - } else { - if (mSuspended == RECORD_RESUMED) { - if (!mVideoEncoder) { - mSuspended = RECORD_NOT_SUSPENDED; // no video - } - } } } diff --git a/dom/media/encoder/MediaEncoder.h b/dom/media/encoder/MediaEncoder.h index 2ebceb035d34..5891fc98c793 100644 --- a/dom/media/encoder/MediaEncoder.h +++ b/dom/media/encoder/MediaEncoder.h @@ -107,17 +107,11 @@ public : ~MediaEncoder() {}; - enum SuspendState { - RECORD_NOT_SUSPENDED, - RECORD_SUSPENDED, - RECORD_RESUMED - }; - /* Note - called from control code, not on MSG threads. */ void Suspend() { MOZ_ASSERT(NS_IsMainThread()); - mSuspended = RECORD_SUSPENDED; + mSuspended = true; mVideoSink->Suspend(); } @@ -128,9 +122,7 @@ public : void Resume() { MOZ_ASSERT(NS_IsMainThread()); - if (mSuspended == RECORD_SUSPENDED) { - mSuspended = RECORD_RESUMED; - } + mSuspended = false; mVideoSink->Resume(); } @@ -252,7 +244,7 @@ private: int mState; bool mShutdown; bool mDirectConnected; - Atomic mSuspended; + Atomic mSuspended; // Get duration from create encoder, for logging purpose double GetEncodeTimeStamp() { From 5b66c825ed7e7a5d88294fd16b71f66b28e9a40f Mon Sep 17 00:00:00 2001 From: Bryce Van Dyk Date: Fri, 5 May 2017 15:13:11 +1200 Subject: [PATCH 30/35] Bug 1354457 - Record time spent paused in media encoder and adjust time stamps when muxing. r=pehrsons MozReview-Commit-ID: 7J6oQf7qn4u --HG-- extra : rebase_source : 715046ccff225d481d32330db105697e1112528e --- dom/media/encoder/MediaEncoder.cpp | 50 ++++++++++++++++++++++++++++++ dom/media/encoder/MediaEncoder.h | 30 +++++++++--------- 2 files changed, 66 insertions(+), 14 deletions(-) diff --git a/dom/media/encoder/MediaEncoder.cpp b/dom/media/encoder/MediaEncoder.cpp index dfb794d5f96c..0ec1425f83af 100644 --- a/dom/media/encoder/MediaEncoder.cpp +++ b/dom/media/encoder/MediaEncoder.cpp @@ -6,6 +6,7 @@ #include "MediaDecoder.h" #include "nsIPrincipal.h" #include "nsMimeTypes.h" +#include "TimeUnits.h" #include "mozilla/Logging.h" #include "mozilla/Preferences.h" #include "mozilla/StaticPtr.h" @@ -39,6 +40,32 @@ MediaStreamVideoRecorderSink::SetCurrentFrames(const VideoSegment& aSegment) } } +void +MediaEncoder::Suspend() +{ + MOZ_ASSERT(NS_IsMainThread()); + mLastPauseStartTime = TimeStamp::Now(); + mSuspended = true; + mVideoSink->Suspend(); +} + +void +MediaEncoder::Resume() +{ + MOZ_ASSERT(NS_IsMainThread()); + if (!mSuspended) { + return; + } + media::TimeUnit timeSpentPaused = + media::TimeUnit::FromTimeDuration( + TimeStamp::Now() - mLastPauseStartTime); + MOZ_ASSERT(timeSpentPaused.ToMicroseconds() >= 0); + MOZ_RELEASE_ASSERT(timeSpentPaused.IsValid()); + mMicrosecondsSpentPaused += timeSpentPaused.ToMicroseconds();; + mSuspended = false; + mVideoSink->Resume(); +} + void MediaEncoder::SetDirectConnect(bool aConnected) { @@ -321,6 +348,29 @@ MediaEncoder::WriteEncodedDataToMuxer(TrackEncoder *aTrackEncoder) mState = ENCODE_ERROR; return rv; } + + // Update timestamps to accommodate pauses + const nsTArray >& encodedFrames = + encodedVideoData.GetEncodedFrames(); + // Take a copy of the atomic so we don't continually access it + uint64_t microsecondsSpentPaused = mMicrosecondsSpentPaused; + for (size_t i = 0; i < encodedFrames.Length(); ++i) { + RefPtr frame = encodedFrames[i]; + if (frame->GetTimeStamp() > microsecondsSpentPaused && + frame->GetTimeStamp() - microsecondsSpentPaused > mLastMuxedTimestamp) { + // Use the adjusted timestamp if it's after the last timestamp + frame->SetTimeStamp(frame->GetTimeStamp() - microsecondsSpentPaused); + } else { + // If not, we force the last time stamp. We do this so the frames are + // still around and in order in case the codec needs to reference them. + // Dropping them here may result in artifacts in playback. + frame->SetTimeStamp(mLastMuxedTimestamp); + } + MOZ_ASSERT(mLastMuxedTimestamp <= frame->GetTimeStamp(), + "Our frames should be ordered by this point!"); + mLastMuxedTimestamp = frame->GetTimeStamp(); + } + rv = mWriter->WriteEncodedTrack(encodedVideoData, aTrackEncoder->IsEncodingComplete() ? ContainerWriter::END_OF_STREAM : 0); diff --git a/dom/media/encoder/MediaEncoder.h b/dom/media/encoder/MediaEncoder.h index 5891fc98c793..2b0c3bd39e0b 100644 --- a/dom/media/encoder/MediaEncoder.h +++ b/dom/media/encoder/MediaEncoder.h @@ -103,28 +103,19 @@ public : , mShutdown(false) , mDirectConnected(false) , mSuspended(false) + , mMicrosecondsSpentPaused(0) + , mLastMuxedTimestamp(0) {} ~MediaEncoder() {}; /* Note - called from control code, not on MSG threads. */ - void Suspend() - { - MOZ_ASSERT(NS_IsMainThread()); - mSuspended = true; - mVideoSink->Suspend(); - } + void Suspend(); /** * Note - called from control code, not on MSG threads. - * Arm to collect the Duration of the next video frame and give it - * to the next frame, in order to avoid any possible loss of sync. */ - void Resume() - { - MOZ_ASSERT(NS_IsMainThread()); - mSuspended = false; - mVideoSink->Resume(); - } + * Calculates time spent paused in order to offset frames. */ + void Resume(); /** * Tells us which Notify to pay attention to for media @@ -244,7 +235,18 @@ private: int mState; bool mShutdown; bool mDirectConnected; + // Tracks if the encoder is suspended (paused). Used on the main thread and + // MediaRecorder's read thread. Atomic mSuspended; + // Timestamp of when the last pause happened. Should only be accessed on the + // main thread. + TimeStamp mLastPauseStartTime; + // Exposes the time spend paused in microseconds. Read by the main thread + // and MediaRecorder's read thread. Should only be written by main thread. + Atomic mMicrosecondsSpentPaused; + // The timestamp of the last muxed sample. Should only be used on + // MediaRecorder's read thread. + uint64_t mLastMuxedTimestamp; // Get duration from create encoder, for logging purpose double GetEncodeTimeStamp() { From fd8d18e66b23ab1d21ebea4b5604311f547f5596 Mon Sep 17 00:00:00 2001 From: Bryce Van Dyk Date: Mon, 15 May 2017 08:56:27 +1200 Subject: [PATCH 31/35] Bug 1354457 - Add test to check video is paused and resumed correctly in MediaRecorder. r=pehrsons MozReview-Commit-ID: Gn9LRsVPFhY --HG-- extra : rebase_source : bc5da3aaba9f695a0f4a5f2ac64fa9814047e7e7 --- dom/media/test/mochitest.ini | 3 + ...test_mediarecorder_pause_resume_video.html | 130 ++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 dom/media/test/test_mediarecorder_pause_resume_video.html diff --git a/dom/media/test/mochitest.ini b/dom/media/test/mochitest.ini index 152ac07b12e9..291a0ca195a1 100644 --- a/dom/media/test/mochitest.ini +++ b/dom/media/test/mochitest.ini @@ -802,6 +802,9 @@ tags=msg [test_mediarecorder_getencodeddata.html] skip-if = android_version == '17' # android(bug 1232305) tags=msg +[test_mediarecorder_pause_resume_video.html] +skip-if = toolkit == 'android' # android(bug 1232305) +tags=msg [test_mediarecorder_principals.html] skip-if = (os == 'linux' && bits == 64) || toolkit == 'android' # See bug 1266345, android(bug 1232305) tags=msg diff --git a/dom/media/test/test_mediarecorder_pause_resume_video.html b/dom/media/test/test_mediarecorder_pause_resume_video.html new file mode 100644 index 000000000000..bf0ccf79363b --- /dev/null +++ b/dom/media/test/test_mediarecorder_pause_resume_video.html @@ -0,0 +1,130 @@ + + + + Test MediaRecorder Recording doesn't record during pause + + + + + +

+
+ + > +
+ +
+ + From b10ba93aa1beb6fb714b5de7fec9ae31030f17f6 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 22 May 2017 07:46:48 +0900 Subject: [PATCH 32/35] Bug 1365629 - Update reftest expectations. r=me MozReview-Commit-ID: 8sXvXHZLCOj --- layout/reftests/svg/reftest.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index 3db0c14fe5d3..593d5b9744cd 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -393,7 +393,7 @@ fuzzy-if(skiaContent,1,3600) == rect-01.svg pass.svg fuzzy-if(skiaContent,1,340) fails-if(stylo) == stroke-dasharray-02.svg pass.svg fuzzy-if(skiaContent,1,340) == stroke-dasharray-03.svg pass.svg == stroke-dasharray-and-pathLength-01.svg pass.svg -fails-if(stylo) == stroke-dasharray-and-text-01.svg stroke-dasharray-and-text-01-ref.svg +== stroke-dasharray-and-text-01.svg stroke-dasharray-and-text-01-ref.svg == stroke-dashoffset-01.svg pass.svg == stroke-dashoffset-and-pathLength-01.svg pass.svg == stroke-linecap-circle-ellipse-01.svg stroke-linecap-circle-ellipse-01-ref.svg @@ -434,7 +434,7 @@ fuzzy-if(skiaContent,1,2600) == svg-in-foreignObject-02.xhtml svg-in-foreignObje == text-font-size-01.svg pass.svg random-if(gtkWidget) == text-font-weight-01.svg text-font-weight-01-ref.svg # bug 386713 == text-gradient-01.svg text-gradient-01-ref.svg -random-if(winWidget) fails-if(stylo) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101 +random-if(winWidget) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101 fuzzy-if(skiaContent,1,5500) == text-gradient-03.svg pass.svg HTTP(..) == text-gradient-04.svg text-gradient-04-ref.svg == text-in-link-01.svg text-in-link-01-ref.svg From a9c81b287a63268a5bb849d735849f828daeb197 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Sun, 21 May 2017 16:54:16 -0500 Subject: [PATCH 33/35] servo: Merge #16905 - Update harfbuzz-sys (from MortimerGoro:update_harfbuzz); r=jdm See https://github.com/servo/rust-harfbuzz/pull/71/files. Required for https://github.com/servo/servo/issues/11921 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ Source-Repo: https://github.com/servo/servo Source-Revision: eabbee629104076c1a776a31bf0fd0b5b802964f --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 6c1fb4ad19e3dc9d461571bdadf088b053880b93 --- servo/Cargo.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/servo/Cargo.lock b/servo/Cargo.lock index 3175cd557286..4fb540e2fe2c 100644 --- a/servo/Cargo.lock +++ b/servo/Cargo.lock @@ -998,7 +998,7 @@ dependencies = [ "fontsan 0.3.2 (git+https://github.com/servo/fontsan)", "freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "harfbuzz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "harfbuzz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1124,10 +1124,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "harfbuzz-sys" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3160,7 +3161,7 @@ name = "unicode-script" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "harfbuzz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "harfbuzz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3538,7 +3539,7 @@ dependencies = [ "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b280007fa9c7442cfd1e0b1addb8d1a59240267110e8705f8f7e2c7bfb7e2f72" "checksum half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" -"checksum harfbuzz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6b76113246f5c089dcf272cf89c3f61168a4d77b50ec5b2c1fab8c628c9ea762" +"checksum harfbuzz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "3072efe30deebdda55fcbe7c74c6d42f546fd8533488e43a692ea940ecface11" "checksum heapsize 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "556cd479866cf85c3f671209c85e8a6990211c916d1002c2fcb2e9b7cf60bc36" "checksum heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "46f96d52fb1564059fc97b85ef6165728cc30198ab60073bf114c66c4c89bb5d" "checksum heartbeats-simple 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ad003ce233955e9d95f2c69cde84e68302ba9ba4a673d351c9bff93c738aadc" From 9d58320b21596e98b26bcac45b77a4a01fabff33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 20 May 2017 12:59:33 +0200 Subject: [PATCH 34/35] Bug 1366474: Devirtualize Element::{Get,Set}SMILOverrideStyleDeclaration. r=birtles MozReview-Commit-ID: JYLt6lE0bZt --HG-- extra : rebase_source : 4c57e9d274db1319504ac3072031b16da98d9e7c --- dom/base/Element.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/base/Element.h b/dom/base/Element.h index 3b76cdc223ea..227d25387815 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -329,15 +329,15 @@ public: * Get the SMIL override style declaration for this element. If the * rule hasn't been created, this method simply returns null. */ - virtual DeclarationBlock* GetSMILOverrideStyleDeclaration(); + DeclarationBlock* GetSMILOverrideStyleDeclaration(); /** * Set the SMIL override style declaration for this element. If * aNotify is true, this method will notify the document's pres * context, so that the style changes will be noticed. */ - virtual nsresult SetSMILOverrideStyleDeclaration( - DeclarationBlock* aDeclaration, bool aNotify); + nsresult SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration, + bool aNotify); /** * Returns a new nsISMILAttr that allows the caller to animate the given From 47dc11465b7efbfb652322d0b49e5fee9ecf9582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 20 May 2017 13:02:43 +0200 Subject: [PATCH 35/35] Bug 1366474: While we're here, devirtualize GetSMILOverrideStyle too. r=birtles Also, update an outdated comment that was leftover. MozReview-Commit-ID: CC865rj3o3S --HG-- extra : rebase_source : 094ed5c23a55f8f00f7aeb18856c539caa80ff86 --- dom/base/Element.h | 2 +- dom/base/FragmentOrElement.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/base/Element.h b/dom/base/Element.h index 227d25387815..66cca1b8bd13 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -357,7 +357,7 @@ public: * Note: This method is analogous to the 'GetStyle' method in * nsGenericHTMLElement and nsStyledElement. */ - virtual nsICSSDeclaration* GetSMILOverrideStyle(); + nsICSSDeclaration* GetSMILOverrideStyle(); /** * Returns if the element is labelable as per HTML specification. diff --git a/dom/base/FragmentOrElement.h b/dom/base/FragmentOrElement.h index 8f9f7a4de8c8..2a33f997c9c3 100644 --- a/dom/base/FragmentOrElement.h +++ b/dom/base/FragmentOrElement.h @@ -275,7 +275,7 @@ public: /** * SMIL Overridde style rules (for SMIL animation of CSS properties) - * @see nsIContent::GetSMILOverrideStyle + * @see Element::GetSMILOverrideStyle */ nsCOMPtr mSMILOverrideStyle;