RFR: 8351733: [macos] Crash when creating too many nested event loops [v4]
Martin Fox
mfox at openjdk.org
Wed Mar 26 18:48:14 UTC 2025
On Wed, 26 Mar 2025 18:22:50 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Martin Fox has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Set limit on nested event loop count to 200 which seems less arbitrary
>> - The max nested event loop limit is now platform-independent
>
> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line 279:
>
>> 277: * @since 25
>> 278: */
>> 279: public static final int MAX_NESTED_EVENT_LOOPS = 200;
>
> I would rather not make this constant public. This is essentially a safeguard measure, with the main purpose to prevent the crash and give the indication to the application developer that their program has an issue. From this perspective, the actual number is not important and should not be codified as a public API (but definitely declared as a constant internally).
>
> What do you think?
I don't think it needs to be public. If we privatize this constant I could use some guidance on where to place it so that the system test can access it. Currently there are two system tests that exercise nested event loops (PlatformTest.java and NestedEventLoopTest.java) and they only rely on public API's.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1741#discussion_r2014810809
More information about the openjfx-dev
mailing list