Open jdm opened 9 years ago
'inexperienced JSAPI user' here: I have indeed attempted to do this multiple times
Was discussing this on IRC. I think we're close to the point where we can directly determine what fields should be public/private using the original headers. I made all the fields public originally to make things easier to use, but it's probably not necessary now. ptr in Handle<T>
is private, so doing this would also fix this issue.
It's too easy for inexperienced JSAPI users to turn to manual Handle creation. We should hide the fields and add an unsafe
from_rooted_location
static method instead, so it's clearer what invariants must be upheld.