⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259765 in webkit


Ignore:
Timestamp:
Apr 8, 2020, 4:50:38 PM (6 years ago)
Author:
beidson@apple.com
Message:

Handle [PDFDocument initWithProvider:] returning nil
<rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224

Reviewed by Geoff Garen.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r259762 r259765  
     12020-04-08  Brady Eidson  <beidson@apple.com>
     2
     3        Handle [PDFDocument initWithProvider:] returning nil
     4        <rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224
     5
     6        Reviewed by Geoff Garen.
     7
     8        * WebProcess/Plugins/PDF/PDFPlugin.mm:
     9        (WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"
     10
    1112020-04-08  Daniel Bates  <dabates@apple.com>
    212
  • trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm

    r259760 r259765  
    868868    m_backgroundThreadDocument = adoptNS([[pdfDocumentClass() alloc] initWithProvider:dataProvider.get()]);
    869869
     870    // [PDFDocument initWithProvider:] will return nil in cases where the PDF is non-linearized.
     871    // In those cases we'll just keep buffering the entire PDF on the main thread.
     872    if (!m_backgroundThreadDocument)
     873        return;
     874
    870875    if (!m_incrementalPDFLoadingEnabled) {
    871876        m_backgroundThreadDocument = nil;
Note: See TracChangeset for help on using the changeset viewer.