Use Heap instead of UnsafeCell in DOM reflectors#15118
Use Heap instead of UnsafeCell in DOM reflectors#15118bors-servo merged 1 commit intoservo:masterfrom
Conversation
|
r? @Ms2ger |
|
I noticed that |
842eff5 to
3fe9521
Compare
|
You are correct. I have updated the code to account for that. |
3fe9521 to
e5eaab3
Compare
|
@bors-servo: try |
|
⌛ Trying commit e5eaab3 with merge 469a3f4... |
Use Heap instead of UnsafeCell in DOM reflectors The previous `Reflector` implementation did not use post barriers, so we could crash when storing nursery objects in a `Reflector` structure that were later moved out of the nursery. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15085 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15118) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev |
|
I don't see anything wrong with this, but would feel more comfortable if you had someone from the SM GC side have a look too. (Feel free to take this as r+ either way.) |
@bors-servo: r=Ms2ger |
|
📌 Commit e5eaab3 has been approved by |
|
Using Heap is the right thing to do here. I have minimal knowledge of rust, but this looks good to me. |
| /// required by the JSAPI rooting APIs. | ||
| pub fn rootable(&self) -> *mut *mut JSObject { | ||
| self.object.get() | ||
| pub fn rootable(&self) -> &Heap<*mut JSObject> { |
There was a problem hiding this comment.
Should this be &mut instead?
There was a problem hiding this comment.
I argue that we can discuss that separately, since the changes here achieve the same effect as previously existed.
|
@bors-servo: r=Ms2ger |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit e5eaab3 has been approved by |
|
@bors-servo try- |
|
@bors-servo retry |
|
⌛ Testing commit e5eaab3 with merge 2b91bb3... |
Use Heap instead of UnsafeCell in DOM reflectors The previous `Reflector` implementation did not use post barriers, so we could crash when storing nursery objects in a `Reflector` structure that were later moved out of the nursery. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15085 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15118) <!-- Reviewable:end -->
|
💔 Test failed - windows-gnu-dev |
|
@bors-servo retry servo/saltfs#585 |
|
@bors-servo: r- |
|
@bors-servo r=Ms2ger |
|
📌 Commit e5eaab3 has been approved by |
|
⌛ Testing commit e5eaab3 with merge 023a9c5... |
Use Heap instead of UnsafeCell in DOM reflectors The previous `Reflector` implementation did not use post barriers, so we could crash when storing nursery objects in a `Reflector` structure that were later moved out of the nursery. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15085 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15118) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev |
The previous
Reflectorimplementation did not use post barriers, so we could crash when storing nursery objects in aReflectorstructure that were later moved out of the nursery../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is