Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Make WebIDL::invoke_callback() report exceptions in various places #2739

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

tcl3
Copy link
Member

@tcl3 tcl3 commented Dec 3, 2024

This fixes a number of WPT tests, which expect an error to be reported if an exception is thrown in the timer callback.

Seven tests related to exception reporting, which were previously failing have been imported.

@tcl3 tcl3 marked this pull request as draft December 4, 2024 00:33
@tcl3 tcl3 force-pushed the libweb_error_reporting_fixes branch from be2daab to 136ff15 Compare December 5, 2024 10:21
@tcl3 tcl3 marked this pull request as ready for review December 5, 2024 10:23
@tcl3 tcl3 force-pushed the libweb_error_reporting_fixes branch from 136ff15 to f597e18 Compare December 5, 2024 10:27
@tcl3 tcl3 changed the title LibWeb: Update run_timer_initialization_steps to the latest spec LibWeb: Make WebIDL::invoke_callback() report exceptions in various places Dec 5, 2024
@tcl3
Copy link
Member Author

tcl3 commented Dec 5, 2024

My latest push uses the correct default exception behavior, which prevents a few Streams related crashes that were previously occurring.

@tcl3 tcl3 force-pushed the libweb_error_reporting_fixes branch from f597e18 to ef38657 Compare December 5, 2024 10:49
@tcl3 tcl3 force-pushed the libweb_error_reporting_fixes branch from ef38657 to f627338 Compare December 5, 2024 17:32
tcl3 added 7 commits December 6, 2024 16:15
`WebIDL::invoke_callback()` now takes an `exception_behavior`
parameter, which can be set to `report` to report an exception before
returning. Setting `exception_behavior` to `rethrow` retains the
previous behavior.
This fixes a number of WPT tests, which expect an error to be reported
if an exception is thrown in the timer callback.
@tcl3 tcl3 force-pushed the libweb_error_reporting_fixes branch from f627338 to 831934b Compare December 6, 2024 16:15
@tcl3 tcl3 merged commit e74d8a6 into LadybirdBrowser:master Dec 19, 2024
6 checks passed
@tcl3 tcl3 deleted the libweb_error_reporting_fixes branch December 19, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants