Repository navigation
fix(webkitgtk): only inject IPC bridge with handler - #1839
Merged
Legend-Master merged 2 commits intoSep 29, 2026
Merged
Conversation
This was referenced Sep 12, 2026
Contributor
Package Changes Through 7546f15There are 1 changes which include wry with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Comment on lines
+66
to
+70
| const IPC_INIT_SCRIPT: &str = "Object.defineProperty(window, 'ipc', { value: Object.freeze({ postMessage: function(x) { window.webkit.messageHandlers['ipc'].postMessage(x) } }) })"; | ||
|
|
||
| fn ipc_init_script(ipc_enabled: bool) -> Option<&'static str> { | ||
| ipc_enabled.then_some(IPC_INIT_SCRIPT) | ||
| } |
Contributor
There was a problem hiding this comment.
This is much more added complexity than needed, let's keep it simple by removing this and the tests. Just keep the ipc_handler.is_some check is enough.
zackees
force-pushed
the
fix/conditional-ipc-bridge
branch
2 times, most recently
from
September 16, 2026 15:59
9582740 to
8a00ed6
Compare
Contributor
Author
|
It's been signed |
Contributor
Author
|
Thanks for the review! Both requests are addressed:
|
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
zackees
force-pushed
the
fix/conditional-ipc-bridge
branch
from
September 18, 2026 20:44
763bd6c to
15a6309
Compare
Legend-Master
approved these changes
Sep 29, 2026
Ranrar
added a commit
to Ranrar/wry
that referenced
this pull request
Oct 20, 2026
Sync with upstream dev (926dd15, 14 commits). Linux-related upstream fixes are ported to the gtk4/webkit6 backend: - webkitgtk: log script eval errors under the `tracing` feature (tauri-apps#1868), adapted from run_javascript to webkit6 evaluate_javascript for both pending init scripts and eval() - webkitgtk: keep a separate failure flag for each download (tauri-apps#1893), moved inside NetworkSession::connect_download_started - webkitgtk: only inject the window.ipc bridge when an IPC handler is set (tauri-apps#1839) Conflict resolution: - bench/tests/Cargo.toml: keep winit + gtk4 deps instead of upstream's tao 0.37 bump (tao pulls in gtk3) - webview2: combine sync imports (Arc, AtomicBool) with upstream's once_cell -> std LazyLock migration (tauri-apps#1861) - webkitgtk/{mod,web_context}.rs: keep gtk4/webkit6 code over upstream edits to the gtk3/webkit2gtk code Android, macOS and CI changes merged without conflicts.
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 WebKitGTK backend conditionally registered the native IPC handler, but unconditionally injected the browser-facing
window.ipcbridge. This leaves a browser-visible host bridge on webviews that intentionally configure no IPC handler.This makes script injection conditional on the same IPC-handler configuration and adds a focused regression test.
Coordinated with forge-ci/kernal-api#18 and tauri-apps/tauri#16010.