Repository navigation
Debug-only dynamic checks for layout and GC use of DOMRefCell - #3797
Merged
Merged
Conversation
|
Critic review: https://critic.hoppipolla.co.uk/r/2962 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 |
Member
|
I see the benefits of duplicating RefCell for the time being, and I appreciate the strictness of the checks here. I think we'll go with this version over the implementation in #3770. |
This gets rid of a dubious transmute:
let val = mem::transmute::<&RefCell<T>, &T>(&self.base);
The code duplication will be reduced once rust-lang/rust#18131 is fixed.
Adds some other dynamic checks in debug builds.
Also fix warnings.
debug_assert! uses
if cfg!(not(ndebug)) { ... }
so the body in a release build is dead code, but it still needs to compile.
kmcallister
force-pushed
the
domrefcell
branch
from
October 24, 2014 23:56
3b8bdc8 to
f508a82
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @mbrubeck, @jdm
Alternative to #3770 and #3716.