提交 b8f5732f 编写于 作者: A Adriano Carlos Verona

Merge remote-tracking branch 'origin/unity-staging' into scripting/boo-call-ast-ctors

......@@ -405,7 +405,6 @@ get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
if (!gi->has_this)
return NULL;
if (gi->this_in_reg)
info = mono_arch_context_get_int_reg (ctx, gi->this_reg);
else
......@@ -413,13 +412,13 @@ get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
gi->this_offset);
if (mono_method_get_context (ji->method)->method_inst) {
return info;
} else if ((ji->method->flags & METHOD_ATTRIBUTE_STATIC) || ji->method->klass->valuetype || !info) {
} else if ((ji->method->flags & METHOD_ATTRIBUTE_STATIC) || ji->method->klass->valuetype) {
return info;
} else {
/* Avoid returning a managed object */
MonoObject *this_obj = info;
return this_obj->vtable->klass;
return this_obj? this_obj->vtable->klass: NULL;
}
}
......@@ -429,7 +428,8 @@ get_generic_context_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
MonoGenericContext context = { NULL, NULL };
MonoClass *class, *method_container_class;
g_assert (generic_info);
if (!generic_info)
return context;
g_assert (ji->method->is_inflated);
if (mono_method_get_context (ji->method)->method_inst) {
......@@ -1252,12 +1252,9 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer origina
* overflow.
*/
if (!initial_trace_ips && (frame_count < 1000)) {
gpointer info = get_generic_info_from_stack_frame (ji, ctx);
if (info) {
trace_ips = g_list_prepend (trace_ips, MONO_CONTEXT_GET_IP (ctx));
trace_ips = g_list_prepend (trace_ips,
info);
}
trace_ips = g_list_prepend (trace_ips, MONO_CONTEXT_GET_IP (ctx));
trace_ips = g_list_prepend (trace_ips,
get_generic_info_from_stack_frame (ji, ctx));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册