Closed salvadordf closed 3 years ago
Firemonkey doesn't allow to subclass NSApplication in MacOS and we can't control when sendEvent is called at all times.
Chromium requires that we return TRUE from CrAppProtocol.isHandlingSendEvent when sendEvent is in the call stack but the current CrAppPrortocol implementation misses some sendEvent calls and that is cause of the crashes.
As a workaround, the demos replace the context menu and the JavaScript dialogs with custom FMX menus and dialogs.
At this moment, we can only use this workaround and add more replacements if necessary.
The Firemonkey and Lazarus demos in MacOS using an external message pump crash when the application shows a modal window or the context menu.
The AV happens when the work scheduler class calls GlobalCEFApp.DoMessageLoopWork from a background thread while the browser is behind a modal window.