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

Bind js::UncheckedUnwrap #232

Merged
merged 2 commits into from Jan 12, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -32,7 +32,7 @@ static CLASS: &'static JSClass = &JSClass {
hasInstance: None,
construct: None,
trace: Some(JS_GlobalObjectTraceHook),
reserved: [0 as *mut _; 25]
reserved: [0 as *mut _; 26]
};

fn main() {
@@ -228,6 +228,7 @@ extern "C" {
pub fn ReportError(aCx: *mut JSContext, aError: *const i8);
pub fn IsWrapper(obj: *mut JSObject) -> bool;
pub fn UnwrapObject(obj: *mut JSObject, stopAtOuter: u8) -> *mut JSObject;
pub fn UncheckedUnwrapObject(obj: *mut JSObject, stopAtOuter: u8) -> *mut JSObject;
pub fn AppendToAutoIdVector(v: *mut AutoIdVector, id: jsid) -> bool;
pub fn CreateAutoObjectVector(aCx: *mut JSContext)
-> *mut AutoObjectVector;
@@ -638,6 +638,12 @@ UnwrapObject(JSObject* obj, bool stopAtOuter)
return js::CheckedUnwrap(obj, stopAtOuter);
}

JSObject*
UncheckedUnwrapObject(JSObject* obj, bool stopAtOuter)
{
return js::UncheckedUnwrap(obj, stopAtOuter);
}

bool
AppendToAutoIdVector(JS::AutoIdVector* v, jsid id)
{
@@ -949,7 +949,7 @@ pub mod test {
construct: None,
trace: Some(JS_GlobalObjectTraceHook),

reserved: [0 as *mut libc::c_void; 25]
reserved: [0 as *mut libc::c_void; 26]
};

unsafe { assert!(JS_Init()); }
@@ -23,7 +23,7 @@ static CLASS: &'static JSClass = &JSClass {
hasInstance: None,
construct: None,
trace: Some(JS_GlobalObjectTraceHook),
reserved: [0 as *mut _; 25]
reserved: [0 as *mut _; 26]
};


ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.