| 298 | } |
| 299 | |
| 300 | VMethodInterposeLinkBase::VMethodInterposeLinkBase(const virtual_identity *host, int vmethod_idx, void *interpose_method, void *chain_mptr, int priority, const char *name) |
| 301 | : host(host), vmethod_idx(vmethod_idx), interpose_method(interpose_method), |
| 302 | chain_mptr(chain_mptr), priority(priority), name_str(name), |
| 303 | applied(false), saved_chain(NULL), next(NULL), prev(NULL) |
| 304 | { |
| 305 | if (vmethod_idx < 0 || interpose_method == NULL) |
| 306 | { |
| 307 | /* |
| 308 | * A failure here almost certainly means a problem in one |
| 309 | * of the pointer-to-method access wrappers above: |
| 310 | * |
| 311 | * - vmethod_idx comes from vmethod_pointer_to_idx_ |
| 312 | * - interpose_method comes from method_pointer_to_addr_ |
| 313 | */ |
| 314 | |
| 315 | fmt::print(stderr, "Bad VMethodInterposeLinkBase arguments: {} {} ({})\n", |
| 316 | vmethod_idx, interpose_method, name_str); |
| 317 | fflush(stderr); |
| 318 | abort(); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | VMethodInterposeLinkBase::~VMethodInterposeLinkBase() |
| 323 | { |