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

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed)

Created:
5 years, 1 month ago by Tom Sepez
Modified:
5 years ago
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@xfa
Target Ref:
refs/heads/xfa
Visibility:
Public.

Description

FWL refcounts never incremented (part 2). Re-introduce create methods that actually create the corresponding impl so we don't have ifaces without impls. Remove per-subclass Initialize() methods. Remove unused ctors. BUG=pdfium:282 R=jun_fang@foxitsoftware.com, thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/8ee79f8f2824d5b7058d49ebb10ced6b001c178e

Patch Set 1 #

Total comments: 2

Patch Set 2 : Actually remove refcounts #

Patch Set 3 : Use unique_ptrs #

Patch Set 4 : Remove static create methods #

Patch Set 5 : Removed on impl side, too. #

Patch Set 6 : comment #

Patch Set 7 : Spurious cast. #

Total comments: 4

Patch Set 8 : Remove m_pTextField #

Patch Set 9 : Forgot to remove unused m_dwRefCount #

Patch Set 10 : rebase #

Patch Set 11 : Re-create Create(). #

Patch Set 12 : Kill unused ctors #

Patch Set 13 : List, Edit, Forms may have several impls. #

Patch Set 14 : Legal cast, it turns out. #

Total comments: 3

Patch Set 15 : Rebase #

Patch Set 16 : Rebased past part1. #

Total comments: 20

Patch Set 17 : Comments in #27 and #28 #

Total comments: 1

Patch Set 18 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+537 lines, -729 lines) Patch
M xfa/include/fwl/basewidget/fwl_barcode.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_caret.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -5 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_checkbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -13 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_combobox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_datetimepicker.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_edit.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_listbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_monthcalendar.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_picturebox.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -2 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_pushbutton.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -2 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_scrollbar.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_spinbutton.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -3 lines 0 comments Download
M xfa/include/fwl/basewidget/fwl_tooltipctrl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -3 lines 0 comments Download
M xfa/include/fwl/core/fwl_form.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -4 lines 0 comments Download
M xfa/include/fwl/core/fwl_grid.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +1 line, -3 lines 0 comments Download
M xfa/include/fwl/core/fwl_panel.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -4 lines 0 comments Download
M xfa/include/fwl/core/fwl_target.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M xfa/include/fwl/core/fwl_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -14 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_caretimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +13 lines, -21 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +12 lines, -32 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +31 lines, -64 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +46 lines, -45 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_editimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +28 lines, -37 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_listboximp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +24 lines, -21 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -35 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +11 lines, -16 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +10 lines, -13 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +10 lines, -40 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +13 lines, -20 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -19 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_barcodeimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_caretimp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_checkboximp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -7 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +21 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_editimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_listboximp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_pictureboximp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_pushbuttonimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_spinbuttonimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_tooltipctrlimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_contentimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -13 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_formimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +15 lines, -41 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_gridimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +14 lines, -24 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_noteimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_panelimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +23 lines, -21 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_targetimp.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_widgetimp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +11 lines, -27 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_contentimp.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_formimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -3 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_gridimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_panelimp.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_widgetimp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -2 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/barcode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/caret.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/checkbox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +12 lines, -18 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/combobox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/datetimepicker.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -9 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/edit.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/listbox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/picturebox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/pushbutton.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/scrollbar.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/lightwidget/tooltipctrl.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -8 lines 0 comments Download
M xfa/src/fwl/src/theme/checkboxtp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -5 lines 0 comments Download
M xfa/src/fxfa/src/app/xfa_fwltheme.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 35 (11 generated)
Tom Sepez
Please sanity check my reasoning.
5 years, 1 month ago (2015-11-16 19:50:26 UTC) #3
Tom Sepez
https://codereview.chromium.org/1453473002/diff/1/xfa/include/fwl/core/fwl_note.h File xfa/include/fwl/core/fwl_note.h (right): https://codereview.chromium.org/1453473002/diff/1/xfa/include/fwl/core/fwl_note.h#newcode133 xfa/include/fwl/core/fwl_note.h:133: virtual IFWL_Target* Retain() { Doesn't override anything, provides its ...
5 years, 1 month ago (2015-11-16 20:07:11 UTC) #4
Lei Zhang
Analysis looks correct to me. None of the Retain() methods being removed are ever called. ...
5 years, 1 month ago (2015-11-16 20:34:49 UTC) #5
Tom Sepez
On 2015/11/16 20:34:49, Lei Zhang wrote: > Analysis looks correct to me. None of the ...
5 years, 1 month ago (2015-11-17 17:36:49 UTC) #6
jun_fang
On 2015/11/17 17:36:49, Tom Sepez wrote: > On 2015/11/16 20:34:49, Lei Zhang wrote: > > ...
5 years, 1 month ago (2015-11-19 16:30:02 UTC) #7
jun_fang
+Bin
5 years, 1 month ago (2015-11-20 09:28:15 UTC) #9
Tom Sepez
On 2015/11/20 09:28:15, jun_fang wrote: > +Bin Any news? Things become much simpler if these ...
5 years ago (2015-11-27 21:31:48 UTC) #10
jun_fang
On 2015/11/27 21:31:48, Tom Sepez wrote: > On 2015/11/20 09:28:15, jun_fang wrote: > > +Bin ...
5 years ago (2015-11-30 04:27:21 UTC) #11
Tom Sepez
PS4 for review.
5 years ago (2015-11-30 23:45:58 UTC) #15
bin_wang
https://codereview.chromium.org/1453473002/diff/120001/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h File xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h (right): https://codereview.chromium.org/1453473002/diff/120001/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h#newcode172 xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h:172: IFWL_Form* m_pForm; Can m_pForm use unique_ptr? https://codereview.chromium.org/1453473002/diff/120001/xfa/src/fwl/src/basewidget/include/fwl_editimp.h File xfa/src/fwl/src/basewidget/include/fwl_editimp.h ...
5 years ago (2015-12-01 11:34:54 UTC) #16
Tom Sepez
https://codereview.chromium.org/1453473002/diff/120001/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h File xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h (right): https://codereview.chromium.org/1453473002/diff/120001/xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h#newcode172 xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h:172: IFWL_Form* m_pForm; On 2015/12/01 11:34:53, bin_wang wrote: > Can ...
5 years ago (2015-12-01 17:18:34 UTC) #17
Tom Sepez
Please take a look at the latest patch set, this organizes things in a more ...
5 years ago (2015-12-03 00:35:11 UTC) #20
Tom Sepez
Ping? Its a lot, but it fits together nicely. Thanks.
5 years ago (2015-12-04 18:53:20 UTC) #21
Tom Sepez
Hints: https://codereview.chromium.org/1453473002/diff/260001/xfa/include/fwl/core/fwl_target.h File xfa/include/fwl/core/fwl_target.h (right): https://codereview.chromium.org/1453473002/diff/260001/xfa/include/fwl/core/fwl_target.h#newcode39 xfa/include/fwl/core/fwl_target.h:39: FWL_ERR Initialize(); Hint: this is what allows me ...
5 years ago (2015-12-04 19:01:27 UTC) #22
Tom Sepez
Judging by the silence on this, maybe you want me to split it into pieces: ...
5 years ago (2015-12-08 17:25:51 UTC) #23
Tom Sepez
Ok, so this is now slightly easier to review. https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/core/fwl_form.h File xfa/include/fwl/core/fwl_form.h (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/core/fwl_form.h#newcode72 xfa/include/fwl/core/fwl_form.h:72: ...
5 years ago (2015-12-08 19:29:37 UTC) #26
Lei Zhang
I only spot checked some of the widgets. https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h File xfa/include/fwl/basewidget/fwl_barcode.h (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h#newcode54 xfa/include/fwl/basewidget/fwl_barcode.h:54: IFWL_Widget* ...
5 years ago (2015-12-09 03:43:42 UTC) #27
jun_fang
https://codereview.chromium.org/1453473002/diff/300001/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp File xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp#newcode38 xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp:38: pRadioButton->SetImpl(pCheckBoxImpl); Nit: when I saw that pRadioButton used pCheckBoxImpl, ...
5 years ago (2015-12-09 10:38:27 UTC) #28
Tom Sepez
https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h File xfa/include/fwl/basewidget/fwl_barcode.h (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h#newcode54 xfa/include/fwl/basewidget/fwl_barcode.h:54: IFWL_Widget* pOuter); On 2015/12/09 03:43:42, Lei Zhang wrote: > ...
5 years ago (2015-12-09 20:32:06 UTC) #29
Tom Sepez
https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_checkbox.h File xfa/include/fwl/basewidget/fwl_checkbox.h (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_checkbox.h#newcode14 xfa/include/fwl/basewidget/fwl_checkbox.h:14: #define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON" Note: the places these are checked ...
5 years ago (2015-12-09 20:40:05 UTC) #30
Lei Zhang
lgtm I guess we can make another pass later and see if there's more params ...
5 years ago (2015-12-09 23:15:57 UTC) #31
jun_fang
On 2015/12/09 20:32:06, Tom Sepez wrote: > https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h > File xfa/include/fwl/basewidget/fwl_barcode.h (right): > > https://codereview.chromium.org/1453473002/diff/300001/xfa/include/fwl/basewidget/fwl_barcode.h#newcode54 ...
5 years ago (2015-12-10 00:06:04 UTC) #32
jun_fang
https://codereview.chromium.org/1453473002/diff/300001/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp File xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp (right): https://codereview.chromium.org/1453473002/diff/300001/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp#newcode38 xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp:38: pRadioButton->SetImpl(pCheckBoxImpl); On 2015/12/09 20:32:06, Tom Sepez wrote: > On ...
5 years ago (2015-12-10 00:06:18 UTC) #33
Tom Sepez
5 years ago (2015-12-10 00:16:33 UTC) #35
Message was sent while issue was closed.
Committed patchset #18 (id:340001) manually as
8ee79f8f2824d5b7058d49ebb10ced6b001c178e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698