-
Notifications
You must be signed in to change notification settings - Fork 6k
[Windows] Don't crash if GetPointerType is unsupported #35442
Conversation
yaakovschectman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
moffatman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
| MockTextInputManager* text_input_manager = new MockTextInputManager(); | ||
| auto windows_proc_table = std::make_unique<MockWindowsProcTable>(); | ||
| auto* text_input_manager = new MockTextInputManager(); | ||
| std::unique_ptr<TextInputManager> text_input_manager_ptr(text_input_manager); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't remember why this is using new and not make_unique() but definitely feel free to clean it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I'll do it in a follow-up pull request. I need to merge this one back into the beta release branch, which is already has hairy merge conflicts 😅
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

The engine's
WindowreferencesGetPointerType, which is supported only on Windows 8 and after. This causes Flutter apps to crash immediately on Windows 7.This introduces
WindowsProcTableto look up Windows APIs dynamically.This bug was introduced in: #31594
Fixes flutter/flutter#109412
Pre-launch Checklist
writing and running engine tests.
///).