mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Convert callers of ImageCodecPlugin to the async API
The HTMLLinkElement caller is a bit hairy, so we shove an await() in there temporarily. This is sure to cause fun times for anyone debugging task/microtask execution order.
This commit is contained in:
parent
39dfb659cf
commit
651e78fedb
Notes:
sideshowbarker
2024-07-17 05:58:46 +09:00
Author: https://github.com/ADKaster
Commit: 651e78fedb
Pull-request: https://github.com/SerenityOS/serenity/pull/24028
Reviewed-by: https://github.com/LucasChollet
Reviewed-by: https://github.com/awesomekling
7 changed files with 78 additions and 71 deletions
|
@ -25,13 +25,4 @@ void ImageCodecPlugin::install(ImageCodecPlugin& plugin)
|
|||
s_the = &plugin;
|
||||
}
|
||||
|
||||
Optional<DecodedImage> ImageCodecPlugin::decode_image(ReadonlyBytes encoded_data)
|
||||
{
|
||||
auto promise = decode_image(encoded_data, {}, {});
|
||||
auto result = promise->await();
|
||||
if (result.is_error())
|
||||
return {};
|
||||
return result.release_value();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue