Skip to content

Conversation

@jonahgraham
Copy link
Contributor

The API for running javascript and integrating with javascript objects and types has changed substantially between GTK3 and GTK4 (technically between webkit2gtk 4 and webkitgtk 6)

The top level methods to call to run javascript changed:

  • webkit_web_view_run_javascript -> webkit_web_view_evaluate_javascript
  • webkit_web_view_run_javascript_finish -> webkit_web_view_evaluate_javascript_finish
  • JSValue methods -> JSCValue methods

With this Browser.execute works, so for example Snippet161 now works and the ControlExample shuts down cleanly.

Fixes #2667

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

Test Results

  118 files  ±0    118 suites  ±0   16m 14s ⏱️ + 1m 23s
4 650 tests ±0  4 633 ✅ ±0  17 💤 ±0  0 ❌ ±0 
  330 runs  ±0    326 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 8212a73. ± Comparison against base commit b02fab8.

♻️ This comment has been updated with latest results.

The API for getting the request information (from which URI is extracted)
changed between GTK3 and GTK4 (technically between webkit2gtk 4 and
webkitgtk 6)

This needs to work so we can enable javascript and is therefore
required as a pre-requisite to make eclipse-platform#2667 work.

Part of eclipse-platform#2667
The API for running javascript and integrating with javascript objects
and types has changed substantially between GTK3 and GTK4 (technically
between webkit2gtk 4 and webkitgtk 6)

The top level methods to call to run javascript changed:

- webkit_web_view_run_javascript -> webkit_web_view_evaluate_javascript
- webkit_web_view_run_javascript_finish -> webkit_web_view_evaluate_javascript_finish
- JSValue methods -> JSCValue methods

With this Browser.execute works, so for example Snippet161 now works and
the ControlExample shuts down cleanly.

Fixes eclipse-platform#2667
@akurtakov akurtakov force-pushed the gtk4-javascript-evaluate branch from f67a348 to 8212a73 Compare October 30, 2025 08:16
@akurtakov
Copy link
Member

Snippet161 doesn't work for me under Wayland
image but works under X11 so I assume this is another problem.
As ControlExample no longer crashes - it's worth merging now.

@akurtakov akurtakov merged commit 6014e1b into eclipse-platform:master Oct 30, 2025
17 checks passed
@jonahgraham
Copy link
Contributor Author

but works under X11 so I assume this is another problem.

For me it is almost the opposite - it works on Wayland and x11 with Xwayland, but fails on x11 with Xtigervnc.

Can you try with #2713 to see if it is something simple like some code path that hits old API?

@jonahgraham jonahgraham deleted the gtk4-javascript-evaluate branch October 30, 2025 13:18
@akurtakov
Copy link
Member

akurtakov commented Oct 30, 2025

I will, I just have to finish some other things. When I say it works with X11 (it means XWayland) as Fedora 43 no longer has Gnome X11 session at all (https://fedoraproject.org/wiki/Changes/WaylandOnlyGNOME)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[GTK4] Webkit crash on close

2 participants