Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Allow getting contract for previously initialized hostpolicy#6343

Merged
elinor-fung merged 3 commits into
dotnet:masterfrom
elinor-fung:getExistingContract
May 7, 2019
Merged

Allow getting contract for previously initialized hostpolicy#6343
elinor-fung merged 3 commits into
dotnet:masterfrom
elinor-fung:getExistingContract

Conversation

@elinor-fung
Copy link
Copy Markdown
Member

@elinor-fung elinor-fung commented May 6, 2019

This enables getting runtime properties for the active context created
through non-context-based entry points.

Fixes #6197

This enables getting runtime properties for the active context created
through non-context-based entry points.
Comment thread Documentation/design-docs/hosting-layer-apis.md Outdated
Comment thread Documentation/design-docs/hosting-layer-apis.md Outdated
Comment thread src/corehost/cli/fxr/fx_muxer.cpp Outdated
int rc = hostpolicy_contract.initialize(nullptr, intialization_options_t::get_contract, &hostpolicy_context_contract);
if (rc != StatusCode::Success)
{
trace::warning(_X("Failed to get contract for existing initialized hostpolicy: 0x%x"), rc);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to fail here. I understand we can make it work, but I think it's dangerous to ignore any failure from hostpolicy. I can't think of a scenario where having this would be important, so unless we can come up with one, I would prefer we block this branch for now. We can always reenable it later on.

vitek-karas and others added 2 commits May 7, 2019 11:34
Co-Authored-By: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
@elinor-fung elinor-fung merged commit 5c4ca8a into dotnet:master May 7, 2019
@elinor-fung elinor-fung deleted the getExistingContract branch May 7, 2019 22:47
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…core-setup#6343)

This enables getting runtime properties for the active context created
through non-context-based entry points.

Commit migrated from dotnet/core-setup@5c4ca8a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow getting runtime properties for the active context when it was created through non-context-based entry points

2 participants