We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mozjs/mozjs-sys/src/jsgc.rs
Lines 333 to 348 in d6c3bd9
I no longer remember when "if you know what you're doing applies", but we have a lot of usages in Servo which makes me nervous.
The text was updated successfully, but these errors were encountered:
IIUC this is only safe when done on RootedGuard<Heap<T>> (or similar, something that ensures that heap is rooted), so we could just do
RootedGuard<Heap<T>>
impl RootedGuard<Heap<T>> { pub fn handle(&self) -> JS::Handle<T> { JS::Handle::from_marked_location(self.ptr.get() as *const _) } }
Sorry, something went wrong.
From my understanding, it's also safe if you have any Heap<T>, as long as it's traced, eg via a custom trace op or a global tracer.
Heap<T>
No branches or pull requests
mozjs/mozjs-sys/src/jsgc.rs
Lines 333 to 348 in d6c3bd9
I no longer remember when "if you know what you're doing applies", but we have a lot of usages in Servo which makes me nervous.
The text was updated successfully, but these errors were encountered: