Repository navigation
Introduce a custom DOMRefCell<T> - #3574
tetsuharuohzeki wants to merge 4 commits into
Conversation
|
Critic review: https://critic.hoppipolla.co.uk/r/2768 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
I'm working to use let attrs: *const Vec<JS<Attr>> = mem::transmute(*self.attrs.borrow_in_layout());But this approach will causes some errors: In |
|
Right, I think this patch might be going about the process the wrong way. We cannot and must not call the borrow method in the layout task. Instead of reimplementing RefCell, I think DOMRefCell should wrap a RefCell internally and the layout task's borrow method should perform the transmute itself and return &T, while the script task's borrow methods should return a |
Umm. it was as I suspected.
Ok. I'll try the such approach. |
0ed3f37 to
024e8c4
Compare
|
@jdm r? |
51104cd to
a884b36
Compare
This type simply wraps `RefCell<T>` to add the special method, and introduce the method to return the pointer of the value contained in itself, for used in layout task.
|
rebased on master & squashed! |
#3050