Skip to content

Conversation

@iamAbhi-916
Copy link
Contributor

@iamAbhi-916 iamAbhi-916 commented Nov 19, 2025

Description

1> Provides the real process ID to the RuntimeSamplingProfile constructor
2>Remove DevSupportManager::OpenDevTools not needed with modern inspector infra
3> move string_format to Microsoft::React namespace
4> Remove support for the old sampling profiler

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

solves modern Inspector Outstanding Issues

Resolves [Add Relevant Issue Here]
#15349

What

1> Provides the real process ID to the RuntimeSamplingProfile constructor
2>Remove DevSupportManager::OpenDevTools not needed with modern inspector infra
3> move string_format to Microsoft::React namespace

Screenshots

image

Testing

tested locally on playground and added unittests for string_format changes.

Changelog

Should this change be included in the release notes: indicate no

Microsoft Reviewers: Open in CodeFlow

@iamAbhi-916 iamAbhi-916 requested a review from a team as a code owner November 21, 2025 10:56
static void SetUIThreadDispatcher(IReactPropertyBag const &properties) noexcept;

static IReactPropertyName JSDispatcherProperty() noexcept;
static IReactDispatcher GetJSDispatcher(IReactPropertyBag const &properties) noexcept;
Copy link
Member

Choose a reason for hiding this comment

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

Please keep the IReactDispatcher.h and IReactDispatcher.cpp files unchanged.
Let's keep the access to the JS dispatcher as we do it for the UI Dispatcher.

winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> getApplicationDataPath(const wchar_t *childfolder);

// string formatting
std::string string_format(_Printf_format_string_ const char *format, ...);
Copy link
Member

Choose a reason for hiding this comment

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

The string_format name does not play well with other naming conventions that we have. We mostly use the Pascal naming conventions. Also, the function should typically start with a verb. Could you please change it to FormatString?


TEST_METHOD(UtilsTest_StringFormat_Simple)
{
auto result = Microsoft::React::string_format("Hello, %s!", "World");
Copy link
Member

Choose a reason for hiding this comment

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

Please avoid using auto unless you absolutely must use it.
Having the std::string here in the new code is much more readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

curious, why avoid auto? I've never actually known what is better style


TEST_METHOD(UtilsTest_StringFormat_EmptyString)
{
auto result = Microsoft::React::string_format("");
Copy link
Member

Choose a reason for hiding this comment

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

What if someone passes nullptr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants