AppDomain.Unload (domain);
domains_3 ();
+
+ typeof (Tests).GetMethod ("called_from_invoke").Invoke (null, null);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void called_from_invoke () {
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
AssertThrows<Exception> (delegate {
d_method.DeclaringType.GetValue (d_method.DeclaringType.GetField ("static_i"));
});
+
+ // Check that .Domain is accessible for stack frames with native transitions
+ e = run_until ("called_from_invoke");
+ ThreadMirror.NativeTransitions = true;
+ foreach (var f in e.Thread.GetFrames ()) {
+ var dom = f.Domain;
+ }
}
[Test]
frame_idx = i;
frame = tls->frames [frame_idx];
+ /* This is supported for frames without has_ctx etc. set */
+ if (command == CMD_STACK_FRAME_GET_DOMAIN) {
+ if (CHECK_PROTOCOL_VERSION (2, 38))
+ buffer_add_domainid (buf, frame->domain);
+ return ERR_NONE;
+ }
+
if (!frame->has_ctx)
return ERR_ABSENT_INFORMATION;