Skip to content

No hermes explicit microtasks in paper#16249

Open
acoates-ms wants to merge 2 commits into
microsoft:0.81-stablefrom
acoates-ms:noHermesMicrotasksInPaper
Open

No hermes explicit microtasks in paper#16249
acoates-ms wants to merge 2 commits into
microsoft:0.81-stablefrom
acoates-ms:noHermesMicrotasksInPaper

Conversation

@acoates-ms

@acoates-ms acoates-ms commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

The legacy paper renderer is not setup to explicitly drain microtasks. But we are always configuring hermes into explicit microtask mode. In core this is controlled by facebook::react::ReactNativeFeatureFlags::enableBridgelessArchitecture(). But that is a global setting, not a per instance setting, which is what we need for Office.
Instead we set a property on the devSettings object to control if we should use explicit microtasks or not.

This fixes an issue where in some cases await calls would not get flushed until another message came though the queue. Which would cause the app to appear hung, and then unfreeze on a mouse move.

Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms requested a review from a team as a code owner June 11, 2026 23:27
@acoates-ms acoates-ms changed the title No hermes microtasks in paper No hermes explicit microtasks in paper Jun 11, 2026
@acoates-ms acoates-ms enabled auto-merge (squash) June 11, 2026 23:29
};

devSettings->useWebSocketTurboModule = getBoolProperty(nullptr, L"UseWebSocketTurboModule", false);
devSettings->hermesSetExplicitMicrotasks = false;

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.

Why is this enabled here? Wouldn't paper always want this off?

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