WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
269358
VAPI for register_script_message_handler of webkitgtk-6.0 is wrong
https://bugs.webkit.org/show_bug.cgi?id=269358
Summary
VAPI for register_script_message_handler of webkitgtk-6.0 is wrong
Zhi
Reported
2024-02-14 05:28:53 PST
According to doc, `world_name` in `register_script_message_handler` and `register_script_message_handler_with_reply` is nullable but the VAPI is not. If world_name is not set to null, we cannot use this messaging merchanism in common browser script.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2024-02-14 07:22:48 PST
I see the world_name parameter of webkit_user_content_manager_register_script_message_handler_with_reply() is not properly annotated as nullable. We can fix that. I don't see anything wrong with register_script_message_handler() though.
Michael Catanzaro
Comment 2
2024-02-14 08:44:44 PST
Pull request:
https://github.com/WebKit/WebKit/pull/24417
Zhi
Comment 3
2024-02-14 09:00:51 PST
Thanks for the fix. Maybe I use an old version of the lib(from fedora repo). I saw the wrong parameter defined for both functions.
Michael Catanzaro
Comment 4
2024-02-14 10:45:23 PST
If you're getting it from Fedora, then it's not old. I maintain the Fedora package. If you can point to evidence showing what is wrong, that would be great. It would be better to look at the gir file than the vapi file, though, because we don't distribute a vapi. That is provided by vala, not by us. Although unlikely, it's possible that a bug could have been introduced at that level.
Michael Catanzaro
Comment 5
2024-02-14 10:49:14 PST
Looks like the vapi was fixed in
https://gitlab.gnome.org/GNOME/vala/-/commit/c5dfcd3065116b94d12ddda54f8feefb944ca51a
and Fedora has that change already. Maybe your vala package is old?
Michael Catanzaro
Comment 6
2024-02-14 10:51:50 PST
Anyway, you can work around this by declaring the function in your own vapi for now. Note that the WebKit change here only directly fixes languages that use introspection directly. It won't directly affect vala until the next time vala updates its WebKitGTK bindings. That doesn't usually take very long, but it means the eventual fix will arrive in a vala update, not a WebKit update. Just something to be aware of.
EWS
Comment 7
2024-02-14 13:10:56 PST
Committed
274653@main
(5d528e1cafca): <
https://commits.webkit.org/274653@main
> Reviewed commits have been landed. Closing PR #24417 and removing active labels.
Zhi
Comment 8
2024-02-15 05:10:01 PST
Thanks. I am new to Vala and don't know much details. I'll check it later after vala update.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug