diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-02-08 21:00:43 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-02-08 21:00:43 -0700 |
commit | 1a47f176ffb059a7a3f29f94485859163cb1284b (patch) | |
tree | 88c31b2899c1ac3ccd9d20c4904d48d54067e59e /components/layout/traversal.rs | |
parent | 13b49ddf446871e7c544bd0b5d6457168c84de46 (diff) | |
parent | 18b49fd68ed56c586b4d16b12a7e12ce5a50ffa8 (diff) | |
download | servo-1a47f176ffb059a7a3f29f94485859163cb1284b.tar.gz servo-1a47f176ffb059a7a3f29f94485859163cb1284b.zip |
auto merge of #4869 : Ms2ger/servo/layout-unsafe, r=jdm
Diffstat (limited to 'components/layout/traversal.rs')
-rw-r--r-- | components/layout/traversal.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index d0123afdcf7..c31d4dcde1a 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -4,6 +4,8 @@ //! Traversals over the DOM and flow trees, running the layout computations. +#![allow(unsafe_blocks)] + use css::node_style::StyledNode; use css::matching::{ApplicableDeclarations, MatchMethods, StyleSharingResult}; use construct::FlowConstructor; @@ -91,11 +93,9 @@ fn take_task_local_bloom_filter(parent_node: Option<LayoutNode>, layout_context: fn put_task_local_bloom_filter(bf: Box<BloomFilter>, unsafe_node: &UnsafeLayoutNode, layout_context: &LayoutContext) { - let bf: *mut BloomFilter = unsafe { mem::transmute(bf) }; - STYLE_BLOOM.with(|style_bloom| { + STYLE_BLOOM.with(move |style_bloom| { assert!(style_bloom.borrow().is_none(), "Putting into a never-taken task-local bloom filter"); - let bf: Box<BloomFilter> = unsafe { mem::transmute(bf) }; *style_bloom.borrow_mut() = Some((bf, *unsafe_node, layout_context.shared.generation)); }) } |