diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-12-18 15:21:16 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-12-18 15:23:44 -0800 |
| commit | f57fd8de1f771b48055e665950dc678fbaf38de1 (patch) | |
| tree | 9377173679d73999d3190c937c3991cbc20a8307 /src/rt/rust_task.cpp | |
| parent | 74d5faa86e1bd1fc678ae3e5aee49e8445470002 (diff) | |
| download | rust-f57fd8de1f771b48055e665950dc678fbaf38de1.tar.gz rust-f57fd8de1f771b48055e665950dc678fbaf38de1.zip | |
rt: Run the cycle collector on the C stack
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 1a1a26fe73d..f74f821819c 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -284,7 +284,9 @@ void task_start_wrapper(spawn_args *a) failed = true; } - cc::do_cc(task); + // We're on the Rust stack and the cycle collector may recurse arbitrarily + // deep, so switch to the C stack + task->sched->c_context.call_shim_on_c_stack(task, (void*)cc::do_cc); rust_closure_env* env = (rust_closure_env*)a->a3; if(env) { |
