Files
ladybird/Libraries/LibWeb/WebDriver/Screenshot.cpp
Shannon Booth c3812d54e1 LibWeb: Push an execution context for WebDriver screenshots
WPT reftests capture screenshots through
WebDriver::draw_bounding_box_from_the_framebuffer(), which creates a
scratch 2D canvas outside normal script execution.

This regressed when CanvasRenderingContext2DSettings started using the
generated bindings conversion path. That path now looks at the current
realm even for this codepath, whereas the previous handwritten
conversion did not, so WebDriver screenshot capture could hit a missing
running execution context and crash.

Push a TemporaryExecutionContext while creating the scratch canvas so
the generated conversion has the realm it expects and WPT reftests no
longer crash.
2026-05-10 10:21:19 +02:00

5.0 KiB