mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1631154 - Fix a size test that was trying to test a now-private type.
MANUAL PUSH: bustage on a CLOSED TREE
This commit is contained in:
parent
57516a9b50
commit
c1c10e4f44
@ -185,6 +185,9 @@ impl RuleTree {
|
||||
/// where it likely did not result from a rigorous performance analysis.)
|
||||
const RULE_TREE_GC_INTERVAL: usize = 300;
|
||||
|
||||
/// Used for some size assertions.
|
||||
pub const RULE_NODE_SIZE: usize = std::mem::size_of::<RuleNode>();
|
||||
|
||||
/// A node in the rule tree.
|
||||
struct RuleNode {
|
||||
/// The root node. Only the root has no root pointer, for obvious reasons.
|
||||
|
@ -19,7 +19,7 @@ mod map;
|
||||
mod source;
|
||||
mod unsafe_box;
|
||||
|
||||
pub use self::core::{RuleTree, StrongRuleNode};
|
||||
pub use self::core::{RuleTree, StrongRuleNode, RULE_NODE_SIZE};
|
||||
pub use self::level::{CascadeLevel, ShadowCascadeOrder};
|
||||
pub use self::source::StyleSource;
|
||||
|
||||
|
@ -8,7 +8,7 @@ use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
use style::data::{ElementData, ElementStyles};
|
||||
use style::gecko::selector_parser::{self, SelectorImpl};
|
||||
use style::properties::ComputedValues;
|
||||
use style::rule_tree::{RuleNode, StrongRuleNode};
|
||||
use style::rule_tree::{RULE_NODE_SIZE, StrongRuleNode};
|
||||
use style::servo_arc::Arc;
|
||||
use style::values::computed;
|
||||
use style::values::specified;
|
||||
@ -53,7 +53,10 @@ size_of_test!(
|
||||
16
|
||||
);
|
||||
|
||||
size_of_test!(test_size_of_rule_node, RuleNode, 80);
|
||||
#[test]
|
||||
fn test_size_of_rule_node() {
|
||||
assert_eq!(RULE_NODE_SIZE, 80, "RuleNode size changed");
|
||||
}
|
||||
|
||||
// This is huge, but we allocate it on the stack and then never move it,
|
||||
// we only pass `&mut SourcePropertyDeclaration` references around.
|
||||
|
Loading…
Reference in New Issue
Block a user