|
Revert of Pdfium: Fix fonts leaking on ClosePage. (patchset #10 id:180001 of https://codereview.chromium.org/2158023002/ )
Reason for revert:
Causes heap-use-after-free. See crbug.com/647612.
Original issue's description:
> Fix memory leaking on ClosePage.
> CFX_FontCache refactoring:
> after this CL: Only one global CFX_FontCache used. Any cached items from it, are released, when its are not used.
>
> BUG= 79367, 48791
>
> The fonts was not cleared after unloading pages.
>
> Test pdf:
>
> http://www.nasa.gov/pdf/750614main_NASA_FY_2014_Budget_Estimates-508.pdf
>
> For this file, we have ~5 fonts per page, which equal ~1 Mb per page.
> In this PDF we have 670 pages, as result after slow scrolling(reading) full document we have ~600 Mb fonts data in memory.
>
> memory usage of PDF Plugin:
> before this CL: ~660 Mb
> after this CL: ~100 Mb
>
> Committed: https://pdfium.googlesource.com/pdfium/+/cde5101eb15b24519e89fa500fe37038bc8e2201
TBR=tsepez@chromium.org,brucedawson@chromium.org,npm@chromium.org,art-snake@yandex-team.ru
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 79367, 48791
Committed: https://pdfium.googlesource.com/pdfium/+/c48089977dc4d2a63d37e6668382c10b42e22a72
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+280 lines, -232 lines) |
Patch |
|
M |
core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
|
View
|
|
7 chunks |
+17 lines, -24 lines |
0 comments
|
Download
|
|
M |
core/fpdfapi/fpdf_parser/cpdf_document.cpp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
core/fpdfapi/fpdf_render/fpdf_render.cpp
|
View
|
|
2 chunks |
+11 lines, -1 line |
0 comments
|
Download
|
|
M |
core/fpdfapi/fpdf_render/fpdf_render_text.cpp
|
View
|
|
9 chunks |
+30 lines, -8 lines |
0 comments
|
Download
|
|
M |
core/fpdfapi/fpdf_render/render_int.h
|
View
|
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/agg/fx_agg_driver.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/agg/fx_agg_driver.cpp
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/apple/apple_int.h
|
View
|
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/apple/fx_apple_platform.cpp
|
View
|
|
5 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
core/fxge/apple/fx_quartz_device.cpp
|
View
|
|
6 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
|
M |
core/fxge/ge/cfx_facecache.cpp
|
View
|
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
core/fxge/ge/cfx_font.cpp
|
View
|
|
9 chunks |
+7 lines, -57 lines |
0 comments
|
Download
|
|
M |
core/fxge/ge/cfx_fontcache.cpp
|
View
|
|
2 chunks |
+34 lines, -19 lines |
0 comments
|
Download
|
|
M |
core/fxge/ge/cfx_renderdevice.cpp
|
View
|
|
10 chunks |
+25 lines, -12 lines |
0 comments
|
Download
|
|
M |
core/fxge/ifx_renderdevicedriver.cpp
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/include/cfx_facecache.h
|
View
|
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
core/fxge/include/cfx_fontcache.h
|
View
|
|
2 chunks |
+5 lines, -12 lines |
0 comments
|
Download
|
|
M |
core/fxge/include/cfx_renderdevice.h
|
View
|
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/include/fx_font.h
|
View
|
|
5 chunks |
+10 lines, -25 lines |
0 comments
|
Download
|
|
M |
core/fxge/include/ifx_renderdevicedriver.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/skia/fx_skia_device.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/skia/fx_skia_device.cpp
|
View
|
|
8 chunks |
+19 lines, -8 lines |
0 comments
|
Download
|
|
M |
core/fxge/skia/fx_skia_device_unittest.cpp
|
View
|
|
4 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
core/fxge/win32/fx_win32_print.cpp
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
core/fxge/win32/win32_int.h
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
xfa/fde/fde_gedevice.cpp
|
View
|
|
4 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
xfa/fxbarcode/oned/BC_OneDimWriter.cpp
|
View
|
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
|
View
|
|
6 chunks |
+15 lines, -9 lines |
0 comments
|
Download
|
|
M |
xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
|
View
|
|
4 chunks |
+10 lines, -6 lines |
0 comments
|
Download
|
|
M |
xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
|
View
|
|
8 chunks |
+20 lines, -12 lines |
0 comments
|
Download
|
|
M |
xfa/fxgraphics/cfx_graphics.cpp
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
Total messages: 5 (2 generated)
|