Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

Allow interior mutability of Heap objects.#328

Merged
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:master
Jan 27, 2017
Merged

Allow interior mutability of Heap objects.#328
bors-servo merged 1 commit intoservo:masterfrom
asajeffrey:master

Conversation

@asajeffrey
Copy link
Copy Markdown

@asajeffrey asajeffrey commented Jan 27, 2017

Over in servo/servo#15120, there's an implementation of WindowProxy to Window bindings, which updates the WindowProxy when navigation happens. This requires mutating the reflector, which is a lot easier if Heap implements interior mutability. Heap already has an UnsafeCell internally, so the only change is that Heap::set takes a &self rather than a &mut self.


This change is Reviewable

@asajeffrey
Copy link
Copy Markdown
Author

r? @jdm

@jdm
Copy link
Copy Markdown
Member

jdm commented Jan 27, 2017

@bors-servo: r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 00956df has been approved by jdm

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 00956df with merge eec73ea...

bors-servo pushed a commit that referenced this pull request Jan 27, 2017
Allow interior mutability of Heap objects.

Over in servo/servo#15120, there's an implementation of `WindowProxy` to `Window` bindings, which updates the `WindowProxy` when navigation happens. This requires mutating the reflector, which is a lot easier if `Heap` implements interior mutability. `Heap` already has an `UnsafeCell` internally, so the only change is that `Heap::set` takes a `&self` rather than a `&mut self`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/328)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - status-appveyor, status-travis

@bors-servo bors-servo merged commit 00956df into servo:master Jan 27, 2017
@asajeffrey asajeffrey mentioned this pull request Jan 27, 2017
bors-servo pushed a commit that referenced this pull request Jan 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants