File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
branches/try/src/libcore/task Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
5
- refs/heads/try: d806c96ffb33acb35414a5743bca3c870d1f15c4
5
+ refs/heads/try: bcec83aaee0a44639a4b231834140dcb1d9adc7b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -94,12 +94,10 @@ unsafe fn get_task_local_map(task: *rust_task) -> TaskLocalMap {
94
94
let map_ptr = rt:: rust_get_task_local_data ( task) ;
95
95
if map_ptr. is_null ( ) {
96
96
let map: TaskLocalMap = @mut ~[ ] ;
97
+ // NB: This bumps the ref count before converting to an unsafe pointer,
98
+ // keeping the map alive until TLS is destroyed
97
99
rt:: rust_set_task_local_data ( task, cast:: transmute ( map) ) ;
98
100
rt:: rust_task_local_data_atexit ( task, cleanup_task_local_map_extern_cb) ;
99
- // Also need to reference it an extra time to keep it for now.
100
- let nonmut = cast:: transmute :: < TaskLocalMap ,
101
- @~[ Option < TaskLocalElement > ] > ( map) ;
102
- cast:: bump_box_refcount ( nonmut) ;
103
101
map
104
102
} else {
105
103
let map = cast:: transmute ( map_ptr) ;
You can’t perform that action at this time.
0 commit comments