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

Remove GC callback, it crashes with rust upgrade. jdm says it's not required. #119

Merged
merged 1 commit into from Nov 6, 2014
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -56,22 +56,9 @@ impl RtUtils for rc::Rc<rt_rsrc> {
}
}

/// If you set your own callback, the first step should be a call to this one.
pub unsafe extern fn gc_callback(rt: *mut JSRuntime, _status: JSGCStatus) {
use std::rt::local::Local;
use std::rt::task::Task;
let mut task = Local::borrow(None::<Task>);
let runtime = task.take_runtime();
let (start, end) = runtime.stack_bounds();
JS_SetNativeStackBounds(rt, cmp::min(start, end) as uintptr_t,
cmp::max(start, end) as uintptr_t);
task.put_runtime(runtime);
}

pub fn rt() -> rt {
unsafe {
let runtime = JS_Init(default_heapsize);
JS_SetGCCallback(runtime, Some(gc_callback));
return new_runtime(runtime);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.