Repository navigation
Conversation
Member
Author
|
There is no other change but mechanical change to use FFM instead of JNI in order to make the port easier to review and test. Any possible improvement is to be handled later. |
Contributor
Contributor
|
Please wait with the merge, I want to review |
Member
Author
|
Sure I don't plan to urge this one , it will take enough time to clean up the noise from moving to Java 25 . I hope that it can't be wrapped up by end of next week. |
Contributor
if you merge the Java 25, I can help with cleaning up the new warnings in SWT. |
Raise the BREE of all bundles to JavaSE-25 and bump their minor versions. The CI builds already use Java 25. This allows using the Foreign Function & Memory API (final since Java 22) instead of JNI.
akurtakov
force-pushed
the
webkitgtk-ffm
branch
2 times, most recently
from
December 4, 2026 11:54
8a50e85 to
5b74e86
Compare
With Java 25 the compiler warns about every lambda parameter that is not used. Name these parameters _ (unnamed variables, Java 22).
DeflaterOutputStream does not end a Deflater passed to it, so its native memory was only freed by the cleaner. Close the Deflater with try-with-resources; it is AutoCloseable since Java 25, and the compiler reports the leak.
The new WebKitFFM class looks up the WebKitGTK library with SymbolLookup and calls its functions, as well as the libsoup and JavaScriptCore ones, through downcall handles that are all created on the first call of any of them. A function missing from the installed WebKitGTK version does nothing and returns 0, as the JNI glue did. WebKitFFM has the same signatures and constants as WebKitGTK, and WebKit now uses it instead, with the callbacks still on SWT's Callback. WebKitGTK and its JNI glue are left unchanged, so they can be removed separately. Assisted-by: Anthropic Claude Code (claude-opus-5-5)
akurtakov
force-pushed
the
webkitgtk-ffm
branch
from
December 4, 2026 12:10
5b74e86 to
542f31c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new WebKitFFM class looks up the WebKitGTK library with SymbolLookup
and calls its functions, as well as the libsoup and JavaScriptCore ones,
through downcall handles that are all created on the first call of any
of them. A function missing from the installed WebKitGTK version does
nothing and returns 0, as the JNI glue did. WebKitFFM has the same
signatures and constants as WebKitGTK, and WebKit now uses it instead,
with the callbacks still on SWT's Callback. WebKitGTK and its JNI glue
are left unchanged, so they can be removed separately.
To test: run Test_org_eclipse_swt_browser_Browser on GTK3 and GTK4 without libswt-webkit-gtk on the library path.
Stacked on #3946 (Require Java 25), whose commit this PR also contains; only the last commit is new.