Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse Heap instead of UnsafeCell in DOM reflectors #15118
Conversation
highfive
commented
Jan 19, 2017
|
r? @Ms2ger |
|
I noticed that |
|
You are correct. I have updated the code to account for that. |
… are used.
|
@bors-servo: try |
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 -->
|
|
|
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 |
|
|
jonco3
commented
Jan 23, 2017
|
Using Heap is the right thing to do here. I have minimal knowledge of rust, but this looks good to me. |
| } | ||
|
|
||
| /// Return a pointer to the memory location at which the JS reflector | ||
| /// object is stored. Used to root the reflector, as | ||
| /// required by the JSAPI rooting APIs. | ||
| pub fn rootable(&self) -> *mut *mut JSObject { | ||
| self.object.get() | ||
| pub fn rootable(&self) -> &Heap<*mut JSObject> { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jdm
Jan 23, 2017
Author
Member
I argue that we can discuss that separately, since the changes here achieve the same effect as previously existed.
|
@bors-servo: r=Ms2ger |
|
|
|
|
@bors-servo try- |
|
@bors-servo retry |
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 -->
|
|
|
@bors-servo retry servo/saltfs#585 |
|
@bors-servo: r- |
|
@bors-servo r=Ms2ger |
|
|
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 -->
|
|
jdm commentedJan 19, 2017
•
edited by larsbergstrom
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