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 5af73ef commit 70d9da2
Show file tree
Hide file tree
Showing 46 changed files with 1,384 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 @@ -539,48 +539,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 @@ -249,25 +249,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 @@ -220,6 +220,15 @@ use
std
:
:
cell
:
:
Ref
;
use
std
:
:
mem
;
use
Expand All @@ -243,15 +252,6 @@ AttrIdentifier
AttrValue
}
;
use
style
:
:
refcell
:
:
Ref
;
/
/
https
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ the
DOM
.
use
refcell
std
:
:
cell
:
:
{
Expand All @@ -80,6 +83,9 @@ RefMut
}
;
use
style
:
:
thread_state
;
/
Expand Down Expand Up @@ -132,22 +138,10 @@ builds
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
Expand Up @@ -1731,17 +1731,12 @@ html
)
.
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 @@ -443,6 +443,18 @@ dom
bindings
:
:
cell
:
:
DOMRefCell
;
use
dom
:
:
bindings
:
:
js
:
:
Expand Down Expand Up @@ -1006,15 +1018,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 @@ -258,10 +258,10 @@ text
Text
;
use
style
std
:
:
refcell
cell
:
:
Ref
Expand Down
Loading

0 comments on commit 70d9da2

Please sign in to comment.