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 upChange RefCells in the DOM to a custom JSRefCell/DOMRefCell #3050
Labels
Comments
|
Does this import cell.rs from rust master and custom it? struct DOMRefCell<T> {
base: RefCell<T>,
...
}
impl<T> DOMRefCell<T> {
...
} |
|
I think it makes sense to wrap the original type like your example. |
|
To implement the safety assertions, let's add a local_data! in layout_interface that LayoutTask::new initializes. Borrow and borrow_in_layout can check it inside cfg!(debug) blocks, since I'm pretty sure task-local data is relatively slow right now. |
|
Once we'll replace all usage of RefCell in script to DOMRefCell for the above safety checking. I'll start to work it :) |
bors-servo
pushed a commit
that referenced
this issue
Oct 21, 2014
bors-servo
pushed a commit
that referenced
this issue
Oct 21, 2014
bors-servo
pushed a commit
that referenced
this issue
Oct 22, 2014
bors-servo
pushed a commit
that referenced
this issue
Oct 22, 2014
bors-servo
pushed a commit
that referenced
this issue
Oct 22, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This ref cell would be just like the built-in ref cell but it would do two things:
This would help prevent problems like the one that broke the in-progress Rust upgrade and would make our code nicer as well.