Skip to content

Commit

Permalink
servo: Merge #13459 - Use parking_lot::RwLock for PropertyDeclaration…
Browse files Browse the repository at this point in the history
…Block (from servo:no-arc-heapsize); r=emilio

<!-- Please describe your changes on the following line: -->

As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1305141

Closes #13176

---

Original PR title: Stop relying on `impl<T: HeapSizeOf> HeapSizeOf for Arc<T>`
servo/heapsize#37 (comment)

This builds on top of that.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [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).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because refactor

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: aea9545e16fd6ea4a6b1234d1b969457313a5fa7

UltraBlame original commit: 0e74d9fe18cf1cbbab7d7410027a051f94eac90f
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 99078ab commit c47f479
Show file tree
Hide file tree
Showing 46 changed files with 1,310 additions and 977 deletions.
11 changes: 0 additions & 11 deletions servo/components/layout/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -321,22 +321,11 @@ script_traits
}
selectors
=
{
version
=
"
0
.
13
"
features
=
[
"
heap_size
"
]
}
serde_macros
=
"
Expand Down
42 changes: 0 additions & 42 deletions servo/components/plugins/lints/unrooted_must_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,48 +245,6 @@ did
&
[
"
style
"
"
refcell
"
"
Ref
"
]
)
|
|
match_def_path
(
cx
did
.
did
&
[
"
style
"
"
refcell
"
"
RefMut
"
]
)
|
|
match_def_path
(
cx
did
.
did
&
[
"
core
"
"
Expand Down
18 changes: 7 additions & 11 deletions servo/components/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ open
.
1
"
parking_lot
=
"
0
.
3
"
phf
=
"
Expand Down Expand Up @@ -598,22 +605,11 @@ script_traits
}
selectors
=
{
version
=
"
0
.
13
"
features
=
[
"
heap_size
"
]
}
serde
=
"
Expand Down
16 changes: 8 additions & 8 deletions servo/components/script/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,25 @@ use
std
:
:
rc
cell
:
:
Rc
Ref
;
use
std
:
:
str
;
use
style
rc
:
:
refcell
Rc
;
use
std
:
:
Ref
str
;
use
url
Expand Down
18 changes: 9 additions & 9 deletions servo/components/script/dom/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ use
std
:
:
cell
:
:
Ref
;
use
std
:
:
mem
;
use
Expand All @@ -185,15 +194,6 @@ AttrIdentifier
AttrValue
}
;
use
style
:
:
refcell
:
:
Ref
;
#
[
dom_struct
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use
refcell
std
:
:
cell
:
:
{
Expand All @@ -11,29 +14,20 @@ RefMut
}
;
use
style
:
:
thread_state
;
#
[
derive
(
Clone
)
]
#
[
cfg_attr
(
feature
=
"
servo
"
derive
(
PartialEq
Debug
HeapSizeOf
)
)
]
pub
struct
Expand Down
11 changes: 3 additions & 8 deletions servo/components/script/dom/bindings/mod.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
pub
use
style
:
:
domrefcell
as
cell
mod
callback
;
pub
mod
callback
cell
;
pub
mod
Expand Down
21 changes: 12 additions & 9 deletions servo/components/script/dom/bindings/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ dom
bindings
:
:
cell
:
:
DOMRefCell
;
use
dom
:
:
bindings
:
:
js
:
:
Expand Down Expand Up @@ -616,15 +628,6 @@ use
style
:
:
domrefcell
:
:
DOMRefCell
;
use
style
:
:
element_state
:
:
Expand Down
4 changes: 2 additions & 2 deletions servo/components/script/dom/characterdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ text
Text
;
use
style
std
:
:
refcell
cell
:
:
Ref
Expand Down
Loading

0 comments on commit c47f479

Please sign in to comment.