Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)

Created:
4 years, 1 month ago by Tom Sepez
Modified:
4 years ago
Reviewers:
Lei Zhang, npm, dsinclair
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Refcount all the IFX_ stream classes all the time. We can remove a lot of "bOwnsStream" logic in the process. Always pass these by const reference, in case the called method wants to hang on to the stream (one exception is where we stick a raw pointer into a void* slot in a context from another layer). Committed: https://pdfium.googlesource.com/pdfium/+/833619b4441915c7c55085d44b3221eaef0d9800

Patch Set 1 #

Patch Set 2 : Fix mac compile #

Patch Set 3 : Fix more build #

Patch Set 4 : chromium style rules #

Patch Set 5 : Missed a few #

Patch Set 6 : Android build #

Patch Set 7 : Duplicate release in FPDF_Doc_Save #

Patch Set 8 : More stray Release(), fix win. #

Patch Set 9 : windpile #

Patch Set 10 : FX_BOOL vs bool again #

Patch Set 11 : Merge branch 'master' of https://pdfium.googlesource.com/pdfium into retain_streams #

Patch Set 12 : android #

Patch Set 13 : re-animate the old patch #

Patch Set 14 : More ripples #

Patch Set 15 : Fix more #

Patch Set 16 : fix build #

Patch Set 17 : more win compile #

Patch Set 18 : fix duplicate release #

Patch Set 19 : stray release #

Patch Set 20 : Clean up cast expression #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -683 lines) Patch
M core/fpdfapi/edit/cpdf_creator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M core/fpdfapi/edit/fpdf_edit_create.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -4 lines 0 comments Download
M core/fpdfapi/page/cpdf_image.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/page/cpdf_image.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M core/fpdfapi/parser/cfdf_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -6 lines 0 comments Download
M core/fpdfapi/parser/cfdf_document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -17 lines 0 comments Download
M core/fpdfapi/parser/cpdf_data_avail.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_data_avail.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +17 lines, -15 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +7 lines, -5 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +19 lines, -28 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +13 lines, -7 lines 0 comments Download
M core/fpdfapi/parser/cpdf_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_stream.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_syntax_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_syntax_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_syntax_parser_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +13 lines, -39 lines 0 comments Download
M core/fpdfapi/parser/fpdf_parser_utility.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M core/fpdfapi/parser/fpdf_parser_utility.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M core/fxcodec/codec/ccodec_progressivedecoder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -5 lines 0 comments Download
M core/fxcodec/codec/ccodec_tiffmodule.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -1 line 0 comments Download
M core/fxcodec/codec/fx_codec_progress.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M core/fxcodec/codec/fx_codec_tiff.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +12 lines, -10 lines 0 comments Download
M core/fxcrt/fx_basic.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -4 lines 0 comments Download
M core/fxcrt/fx_basic_buffer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M core/fxcrt/fx_ext.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -6 lines 0 comments Download
M core/fxcrt/fx_extension.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +23 lines, -49 lines 0 comments Download
M core/fxcrt/fx_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +18 lines, -21 lines 0 comments Download
M core/fxcrt/fx_xml.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -4 lines 0 comments Download
M core/fxcrt/fx_xml_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +30 lines, -40 lines 0 comments Download
M core/fxcrt/xml_int.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -5 lines 0 comments Download
M core/fxge/android/cfpf_skiafilefont.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -2 lines 0 comments Download
M core/fxge/android/cfpf_skiafontmgr.h View 1 2 3 4 5 6 7 8 9 10 11 13 14 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/android/cfpf_skiafontmgr.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -8 lines 0 comments Download
M core/fxge/fx_font.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/ge/cfx_font.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +12 lines, -6 lines 0 comments Download
M fpdfsdk/cpdfsdk_formfillenvironment.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/cpdfsdk_formfillenvironment.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -3 lines 0 comments Download
M fpdfsdk/fpdf_dataavail.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +15 lines, -10 lines 0 comments Download
M fpdfsdk/fpdfeditimg.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M fpdfsdk/fpdfsave.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +28 lines, -30 lines 0 comments Download
M fpdfsdk/fpdfview.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +34 lines, -37 lines 0 comments Download
M fpdfsdk/fpdfxfa/cpdfxfa_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M fpdfsdk/fpdfxfa/cpdfxfa_context.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -2 lines 0 comments Download
M fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +15 lines, -14 lines 0 comments Download
M fpdfsdk/fsdk_define.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -2 lines 0 comments Download
M testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -6 lines 0 comments Download
M testing/libfuzzer/xfa_codec_fuzzer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -6 lines 0 comments Download
M xfa/fde/xml/cfx_saxreader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -3 lines 0 comments Download
M xfa/fde/xml/cfx_saxreader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +20 lines, -17 lines 0 comments Download
M xfa/fgas/crt/fgas_stream.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -5 lines 0 comments Download
M xfa/fgas/crt/fgas_stream.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 19 chunks +78 lines, -70 lines 0 comments Download
M xfa/fgas/font/cfgas_fontmgr.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -7 lines 0 comments Download
M xfa/fgas/font/cfgas_fontmgr.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +28 lines, -47 lines 0 comments Download
M xfa/fgas/font/cfgas_gefont.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -3 lines 0 comments Download
M xfa/fgas/font/cfgas_gefont.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -5 lines 0 comments Download
M xfa/fxfa/app/xfa_checksum.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -3 lines 0 comments Download
M xfa/fxfa/app/xfa_ffapp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -13 lines 0 comments Download
M xfa/fxfa/app/xfa_ffapp_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +10 lines, -10 lines 0 comments Download
M xfa/fxfa/app/xfa_ffdoc.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +15 lines, -27 lines 0 comments Download
M xfa/fxfa/app/xfa_ffwidget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +11 lines, -10 lines 0 comments Download
M xfa/fxfa/fm2js/xfa_fm2jscontext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -2 lines 0 comments Download
M xfa/fxfa/fxfa.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -2 lines 0 comments Download
M xfa/fxfa/parser/cxfa_dataexporter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -2 lines 0 comments Download
M xfa/fxfa/parser/cxfa_dataexporter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +18 lines, -13 lines 0 comments Download
M xfa/fxfa/parser/cxfa_dataimporter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M xfa/fxfa/parser/cxfa_dataimporter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download
M xfa/fxfa/parser/cxfa_document_parser.h View 13 1 chunk +2 lines, -1 line 0 comments Download
M xfa/fxfa/parser/cxfa_document_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M xfa/fxfa/parser/cxfa_node.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -3 lines 0 comments Download
M xfa/fxfa/parser/cxfa_simple_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -2 lines 0 comments Download
M xfa/fxfa/parser/cxfa_simple_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M xfa/fxfa/xfa_checksum.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/xfa_ffapp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -3 lines 0 comments Download
M xfa/fxfa/xfa_ffdoc.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -5 lines 0 comments Download
M xfa/fxfa/xfa_ffwidget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -4 lines 0 comments Download

Messages

Total messages: 84 (75 generated)
Tom Sepez
Lei, for review. Sorry this runs deep.
4 years, 1 month ago (2016-10-25 20:44:27 UTC) #29
Lei Zhang
I'm going to defer to other reviewers.
4 years, 1 month ago (2016-10-25 20:45:34 UTC) #31
npm
Bots red. Also, is this all somehow related or can we split it up a ...
4 years, 1 month ago (2016-10-25 21:14:20 UTC) #32
Tom Sepez
On 2016/10/25 21:14:20, npm wrote: > Bots red. Also, is this all somehow related or ...
4 years, 1 month ago (2016-10-25 21:21:01 UTC) #33
Tom Sepez
On 2016/10/25 21:21:01, Tom Sepez wrote: > On 2016/10/25 21:14:20, npm wrote: > > Bots ...
4 years, 1 month ago (2016-10-26 21:00:03 UTC) #46
Tom Sepez
Ready for another look. It got big again, sorry.
4 years ago (2016-12-06 22:48:40 UTC) #75
dsinclair
LGTM. Gave it a scan and I think it all makes sense.
4 years ago (2016-12-07 14:41:25 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2451493002/380001
4 years ago (2016-12-07 17:08:14 UTC) #81
commit-bot: I haz the power
4 years ago (2016-12-07 17:21:30 UTC) #84
Message was sent while issue was closed.
Committed patchset #20 (id:380001) as
https://pdfium.googlesource.com/pdfium/+/833619b4441915c7c55085d44b3221eaef0d...

Powered by Google App Engine
This is Rietveld 408576698