Bug 251353 - UIProcess API WKPageGetContentsAsMHTMLData does not complete callback if MHTML flag is OFF
Summary: UIProcess API WKPageGetContentsAsMHTMLData does not complete callback if MHTM...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Trivial
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-30 05:06 PST by kiran
Modified: 2023-02-06 05:07 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kiran 2023-01-30 05:06:53 PST
In file API/C/WKPage.cpp method [WKPageGetContentsAsMHTMLData](https://github.com/WebKit/WebKit/blob/0c8fb49c7a40115abe543963829eb8268b96d048/Source/WebKit/UIProcess/API/C/WKPage.cpp#L2673)  does not complete callback if MHTML build (private) flag is OFF.

To add, it appears like [consumers](https://github.com/search?l=C%2B%2B&q=WKPageGetContentsAsMHTMLData&type=Code) of WKPageGetContentsAsMHTMLData, might crash if this callback gets invoked with null values. Most of them are not checking WKErrorRef and doing a reinterpret_cast of WKDataRef.
Comment 1 Radar WebKit Bug Importer 2023-02-06 05:07:20 PST
<rdar://problem/105078481>