mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
This reverts commit 8e15389cae
.
This commit is contained in:
parent
8e15389cae
commit
d6ae8dc112
152 changed files with 4622 additions and 5862 deletions
|
@ -19,5 +19,7 @@ malloc_size_of = { path = "../malloc_size_of" }
|
|||
malloc_size_of_derive = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
size_of_test = { path = "../size_of_test" }
|
||||
webrender_api = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
size_of_test = { path = "../size_of_test" }
|
||||
|
|
|
@ -198,9 +198,6 @@ pub struct PipelineNamespaceId(pub u32);
|
|||
|
||||
namespace_id! {PipelineId, PipelineIndex}
|
||||
|
||||
size_of_test!(PipelineId, 8);
|
||||
size_of_test!(Option<PipelineId>, 8);
|
||||
|
||||
impl PipelineId {
|
||||
pub fn new() -> PipelineId {
|
||||
PIPELINE_NAMESPACE.with(|tls| {
|
||||
|
@ -243,9 +240,6 @@ impl fmt::Display for PipelineId {
|
|||
|
||||
namespace_id! {BrowsingContextId, BrowsingContextIndex}
|
||||
|
||||
size_of_test!(BrowsingContextId, 8);
|
||||
size_of_test!(Option<BrowsingContextId>, 8);
|
||||
|
||||
impl BrowsingContextId {
|
||||
pub fn new() -> BrowsingContextId {
|
||||
PIPELINE_NAMESPACE.with(|tls| {
|
||||
|
@ -275,9 +269,6 @@ thread_local!(pub static TOP_LEVEL_BROWSING_CONTEXT_ID: Cell<Option<TopLevelBrow
|
|||
)]
|
||||
pub struct TopLevelBrowsingContextId(pub BrowsingContextId);
|
||||
|
||||
size_of_test!(TopLevelBrowsingContextId, 8);
|
||||
size_of_test!(Option<TopLevelBrowsingContextId>, 8);
|
||||
|
||||
impl TopLevelBrowsingContextId {
|
||||
pub fn new() -> TopLevelBrowsingContextId {
|
||||
TopLevelBrowsingContextId(BrowsingContextId::new())
|
||||
|
|
|
@ -12,7 +12,5 @@ extern crate malloc_size_of;
|
|||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
pub mod constellation_msg;
|
||||
|
|
31
components/msg/tests/size_of.rs
Normal file
31
components/msg/tests/size_of.rs
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* 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 https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![cfg(target_pointer_width = "64")]
|
||||
|
||||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
use msg::constellation_msg::BrowsingContextId;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
|
||||
size_of_test!(test_size_of_pipeline_id, PipelineId, 8);
|
||||
size_of_test!(test_size_of_optional_pipeline_id, Option<PipelineId>, 8);
|
||||
size_of_test!(test_size_of_browsing_context_id, BrowsingContextId, 8);
|
||||
size_of_test!(
|
||||
test_size_of_optional_browsing_context_id,
|
||||
Option<BrowsingContextId>,
|
||||
8
|
||||
);
|
||||
size_of_test!(
|
||||
test_size_of_top_level_browsing_context_id,
|
||||
TopLevelBrowsingContextId,
|
||||
8
|
||||
);
|
||||
size_of_test!(
|
||||
test_size_of_top_level_optional_browsing_context_id,
|
||||
Option<TopLevelBrowsingContextId>,
|
||||
8
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue