зеркало из https://github.com/github/ruby.git
Implement Write Barrier for Backtrace::Location
It only has a single reference, set in a single place.
This commit is contained in:
Родитель
fe5ce1ee41
Коммит
8e7d2cc2ab
|
@ -165,7 +165,7 @@ location_memsize(const void *ptr)
|
||||||
static const rb_data_type_t location_data_type = {
|
static const rb_data_type_t location_data_type = {
|
||||||
"frame_info",
|
"frame_info",
|
||||||
{location_mark, RUBY_TYPED_DEFAULT_FREE, location_memsize,},
|
{location_mark, RUBY_TYPED_DEFAULT_FREE, location_memsize,},
|
||||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -757,7 +757,7 @@ location_create(rb_backtrace_location_t *srcloc, void *btobj)
|
||||||
obj = TypedData_Make_Struct(rb_cBacktraceLocation, struct valued_frame_info, &location_data_type, vloc);
|
obj = TypedData_Make_Struct(rb_cBacktraceLocation, struct valued_frame_info, &location_data_type, vloc);
|
||||||
|
|
||||||
vloc->loc = srcloc;
|
vloc->loc = srcloc;
|
||||||
vloc->btobj = (VALUE)btobj;
|
RB_OBJ_WRITE(obj, &vloc->btobj, (VALUE)btobj);
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче