Bug 210224 - Handle [PDFDocument initWithProvider:] returning nil
Summary: Handle [PDFDocument initWithProvider:] returning nil
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-08 16:03 PDT by Brady Eidson
Modified: 2020-04-08 16:51 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2020-04-08 16:07 PDT, Brady Eidson
ggaren: review+
Details | Formatted Diff | Diff
Patch (1.57 KB, patch)
2020-04-08 16:16 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2020-04-08 16:03:40 PDT
Handle [PDFDocument initWithProvider:] returning nil

<rdar://problem/61482395>
Comment 1 Brady Eidson 2020-04-08 16:07:36 PDT
Created attachment 395880 [details]
Patch
Comment 2 Geoffrey Garen 2020-04-08 16:10:07 PDT
Comment on attachment 395880 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395880&action=review

r=me

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:873
> +    if (!m_incrementalPDFLoadingEnabled || !m_backgroundThreadDocument) {
>          m_backgroundThreadDocument = nil;

You could just do a separate early return, since it's kinda silly to say "if m_backgroundThreadDocument is null, set m_backgroundThreadDocument to null".
Comment 3 Brady Eidson 2020-04-08 16:16:14 PDT
Created attachment 395882 [details]
Patch
Comment 4 EWS 2020-04-08 16:50:44 PDT
Committed r259765: <https://trac.webkit.org/changeset/259765>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395882 [details].
Comment 5 Radar WebKit Bug Importer 2020-04-08 16:51:15 PDT
<rdar://problem/61485477>