RESOLVED FIXED 208698
Some PDFPlugin cleanup in prep for incremental loading
https://bugs.webkit.org/show_bug.cgi?id=208698
Summary Some PDFPlugin cleanup in prep for incremental loading
Brady Eidson
Reported 2020-03-05 22:35:41 PST
Some PDFPlugin cleanup in prep for incremental loading The frame is never cleared, so make it a reference. Use a new "number of streamed bytes" variable instead of grabbing m_data's length, as m_data will soon become a "sparse" data buffer
Attachments
Patch (17.78 KB, patch)
2020-03-05 22:38 PST, Brady Eidson
no flags
Patch (18.87 KB, patch)
2020-03-06 07:36 PST, Brady Eidson
achristensen: review+
PFL (18.86 KB, patch)
2020-03-06 15:21 PST, Brady Eidson
no flags
Brady Eidson
Comment 1 2020-03-05 22:38:47 PST
Brady Eidson
Comment 2 2020-03-06 07:36:49 PST
Alex Christensen
Comment 3 2020-03-06 14:45:11 PST
Comment on attachment 392719 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392719&action=review > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:275 > + WebFrame& m_frame; Should we use a WeakPtr instead? > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1347 > + if (FrameView* frameView = m_frame.coreFrame()->view()) auto? > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1854 > + Frame* frame = m_frame.coreFrame(); auto?
Brady Eidson
Comment 4 2020-03-06 15:17:33 PST
(In reply to Alex Christensen from comment #3) > Comment on attachment 392719 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=392719&action=review > > > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:275 > > + WebFrame& m_frame; > > Should we use a WeakPtr instead? As this is no behavior change and we have no reason to believe it's currently a problem, not right now. > > > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1347 > > + if (FrameView* frameView = m_frame.coreFrame()->view()) > > auto? > > > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1854 > > + Frame* frame = m_frame.coreFrame(); > > auto? Sure.
Brady Eidson
Comment 5 2020-03-06 15:21:50 PST
WebKit Commit Bot
Comment 6 2020-03-06 17:45:01 PST
Comment on attachment 392786 [details] PFL Clearing flags on attachment: 392786 Committed r258043: <https://trac.webkit.org/changeset/258043>
WebKit Commit Bot
Comment 7 2020-03-06 17:45:03 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2020-03-06 17:46:13 PST
Note You need to log in before you can comment on or make changes to this bug.