Skip to content

[RuntimeAsync] 6 TODOs in dllimport.cpp #121758

@VSadov

Description

@VSadov

There are 6 TODO: (async) in the file.
We need to follow up on that and remove the TODOs as a result of either:

  • confirming that what we have is correct. Perhaps add a comment why it is correct.
  • fix the code and ideally add tests.

It seems to be a right assumption that methods with async call convention are not accessed across pInvoke layer.
The entry points should throw if for whatever reason such methods are encountered. Not entry points might be ok to have as asserts that scenario does not happen.

Examples of TODOs:

DllImportInit
Seems like an entry point to me. If so, throwing would be reasonable "support"

    // TODO: (async) revisit and examine if this needs to be supported somehow
    if (pMD->IsAsyncMethod())
        ThrowHR(COR_E_NOTSUPPORTED);

ETW events for interop stubs:
Probably a scenario that should never happen. If so, assert would be enough.

        if (pTargetMD)
        {
            // TODO: (async) revisit and examine if this needs to be supported somehow
            _ASSERTE(!pTargetMD->IsAsyncVariantMethod());
            dwToken = pTargetMD->GetMemberDef();
        }

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions