1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibPDF: Require Document* in Parser constructor

This makes it a bit easier to avoid calling parser->set_document, an
issue which cost me ~30 minutes to find.
This commit is contained in:
Matthew Olsson 2022-03-22 19:22:45 -07:00 committed by Andreas Kling
parent a8de9cf541
commit 60c3e786be
3 changed files with 7 additions and 6 deletions

View file

@ -77,7 +77,7 @@ PDFErrorOr<void> Renderer::render()
byte_buffer.append(bytes.data(), bytes.size());
}
auto commands = TRY(Parser::parse_graphics_commands(byte_buffer));
auto commands = TRY(Parser::parse_graphics_commands(m_document, byte_buffer));
for (auto& command : commands)
TRY(handle_command(command));