Skip to content
New issue

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

Reformatted JSVal Implementation #387

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions mozjs-sys/src/jsgc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::jsapi::{jsid, JSFunction, JSObject, JSScript, JSString, JSTracer};
use crate::jsid::VoidId;
use std::cell::UnsafeCell;
use std::ffi::c_void;
use std::mem;
use std::ptr;

/// A trait for JS types that can be registered as roots.
Expand Down Expand Up @@ -116,9 +115,9 @@ impl GCMethods for *mut JSFunction {
}
unsafe fn post_barrier(v: *mut *mut JSFunction, prev: *mut JSFunction, next: *mut JSFunction) {
JS::HeapObjectWriteBarriers(
mem::transmute(v),
mem::transmute(prev),
mem::transmute(next),
v as *mut *mut JSObject,
prev as *mut JSObject,
next as *mut JSObject,
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion mozjs-sys/src/jsid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

use crate::jsapi::JS::Symbol;
use crate::jsapi::{jsid, JSString};
use libc::c_void;

use std::ffi::c_void;

#[deprecated]
pub const JSID_VOID: jsid = VoidId();
Expand Down
Loading