diff --git a/components/style/bloom.rs b/components/style/bloom.rs index 5c7f753a6c8..93f3903404f 100644 --- a/components/style/bloom.rs +++ b/components/style/bloom.rs @@ -121,6 +121,12 @@ impl StyleBloom { /// Create an empty `StyleBloom`. Because StyleBloom acquires the thread- /// local filter buffer, creating multiple live StyleBloom instances at /// the same time on the same thread will panic. + + // Forced out of line to limit stack frame sizes after extra inlining from + // https://github.com/rust-lang/rust/pull/43931 + // + // See https://github.com/servo/servo/pull/18420#issuecomment-328769322 + #[inline(never)] pub fn new() -> Self { let bloom_arc = BLOOM_KEY.with(|b| b.clone()); let filter = OwningHandle::new_with_fn(bloom_arc, |x| unsafe { x.as_ref() }.unwrap().borrow_mut()); diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index bf81915ce47..432024128fd 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -465,6 +465,12 @@ impl StyleSharingCandidateCache { } /// Create a new style sharing candidate cache. + + // Forced out of line to limit stack frame sizes after extra inlining from + // https://github.com/rust-lang/rust/pull/43931 + // + // See https://github.com/servo/servo/pull/18420#issuecomment-328769322 + #[inline(never)] pub fn new() -> Self { assert_eq!(mem::size_of::>(), mem::size_of::()); assert_eq!(mem::align_of::>(), mem::align_of::());