mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibPDF: Don't abort on unsupported drawing operations
Instead of calling TODO(), which will abort the program, we now return an Error specifying that we haven't implemented the drawing operation yet. This will now nicely trickle up all the way through to the PDFViewer, which will then notify its clients about the problem.
This commit is contained in:
parent
e87fecf710
commit
c4bc27f274
Notes:
sideshowbarker
2024-07-17 10:08:28 +09:00
Author: https://github.com/rtobar Commit: https://github.com/SerenityOS/serenity/commit/c4bc27f274 Pull-request: https://github.com/SerenityOS/serenity/pull/16496
@ -13,11 +13,10 @@
|
||||
#define RENDERER_HANDLER(name) \
|
||||
PDFErrorOr<void> Renderer::handle_##name([[maybe_unused]] Vector<Value> const& args, [[maybe_unused]] Optional<NonnullRefPtr<DictObject>> extra_resources)
|
||||
|
||||
#define RENDERER_TODO(name) \
|
||||
RENDERER_HANDLER(name) \
|
||||
{ \
|
||||
dbgln("[PDF::Renderer] Unsupported draw operation " #name); \
|
||||
TODO(); \
|
||||
#define RENDERER_TODO(name) \
|
||||
RENDERER_HANDLER(name) \
|
||||
{ \
|
||||
return Error(Error::Type::RenderingUnsupported, "draw operation: " #name); \
|
||||
}
|
||||
|
||||
namespace PDF {
|
||||
|
Loading…
Reference in New Issue
Block a user