servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Should Rooted::ptr be an UnsafeCell? #273

Open Ms2ger opened 8 years ago

Ms2ger commented 8 years ago

The point is that the GC can mutate its value behind our backs.

CC @eddyb

nox commented 8 years ago

I think it should, but we are entering the realm of things that not even a servo-bindgen hack can cover I fear. Should we revisit the idea of writing more bindings by hand?

fitzgen commented 8 years ago

Yes, it most definitely should be an UnsafeCell. GC things moving and the collector updating pointers is exactly the kind of thing that rustc can't understand and needs to be told about, AFAICT.