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

Issue 810883005: Fix -Wnon-virtual-dtor compiler warnings. (Closed)

Created:
5 years, 11 months ago by Tom Sepez
Modified:
5 years, 11 months ago
Reviewers:
Lei Zhang, brucedawson
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix -Wnon-virtual-dtor compiler warnings. This is done by explicitly adding a virtual dtor to interface classes, since the cost is small given that there are already virtual functions. The exceptions are for classes that have a Release() or Delete() method, in which case it is non-virtual and protected to indicate that the virtual class is never the deletion point. BUG= R=brucedawson@chromium.org, thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/b9e0190938f62bf21df078e47190a62ba33ddab2

Patch Set 1 #

Patch Set 2 : Privitization where appropriate. #

Total comments: 13

Patch Set 3 : Address comments #

Patch Set 4 : Restore private destructors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -52 lines) Patch
M core/include/fpdfapi/fpdf_parser.h View 6 chunks +7 lines, -10 lines 0 comments Download
M core/include/fpdfapi/fpdf_render.h View 1 chunk +1 line, -1 line 0 comments Download
M core/include/fpdfdoc/fpdf_ap.h View 1 chunk +1 line, -2 lines 0 comments Download
M core/include/fpdfdoc/fpdf_tagged.h View 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fpdfdoc/fpdf_vt.h View 1 4 chunks +5 lines, -2 lines 0 comments Download
M core/include/fxcodec/fx_codec_provider.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M core/include/fxcrt/fx_arb.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M core/include/fxcrt/fx_basic.h View 3 chunks +3 lines, -3 lines 0 comments Download
M core/include/fxcrt/fx_stream.h View 1 3 chunks +2 lines, -2 lines 0 comments Download
M core/include/fxge/fpf.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M core/include/fxge/fx_dib.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M core/include/fxge/fx_font.h View 1 5 chunks +8 lines, -0 lines 0 comments Download
M core/include/fxge/fx_ge.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/ttgsubtable.h View 1 3 1 chunk +5 lines, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/ttgsubtable.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfdoc/tagged_int.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M core/src/fxcodec/jbig2/JBig2_Module.h View 1 chunk +1 line, -0 lines 0 comments Download
M core/src/fxcrt/fx_arabic.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M fpdfsdk/include/fsdk_annothandler.h View 1 chunk +12 lines, -10 lines 0 comments Download
M fpdfsdk/include/fxedit/fx_edit.h View 1 9 chunks +17 lines, -9 lines 0 comments Download
M fpdfsdk/include/javascript/IJavaScript.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M fpdfsdk/include/pdfwindow/PWL_Edit.h View 1 chunk +1 line, -0 lines 0 comments Download
M fpdfsdk/include/pdfwindow/PWL_EditCtrl.h View 1 chunk +1 line, -0 lines 0 comments Download
M fpdfsdk/include/pdfwindow/PWL_IconList.h View 1 chunk +1 line, -0 lines 0 comments Download
M fpdfsdk/include/pdfwindow/PWL_Note.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M fpdfsdk/include/pdfwindow/PWL_Wnd.h View 3 chunks +4 lines, -0 lines 0 comments Download
M fpdfsdk/src/fpdf_sysfontinfo.cpp View 1 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
Tom Sepez
Lei, Bruce, please review. This may take a careful eye :(.
5 years, 11 months ago (2015-01-08 22:17:21 UTC) #2
brucedawson
Initial evaluation from the compiler: this reduces the number of lines of warnings (Debug builds) ...
5 years, 11 months ago (2015-01-08 22:42:37 UTC) #3
Tom Sepez
Sorry, wrong Lei.
5 years, 11 months ago (2015-01-08 23:08:19 UTC) #5
Lei Zhang
lgtm
5 years, 11 months ago (2015-01-08 23:18:12 UTC) #6
brucedawson
A few comments to think about. https://codereview.chromium.org/810883005/diff/20001/core/include/fxge/fx_dib.h File core/include/fxge/fx_dib.h (right): https://codereview.chromium.org/810883005/diff/20001/core/include/fxge/fx_dib.h#newcode416 core/include/fxge/fx_dib.h:416: virtual ~CFX_ScanlineCompositor(); This ...
5 years, 11 months ago (2015-01-09 00:20:50 UTC) #7
Tom Sepez
https://codereview.chromium.org/810883005/diff/20001/core/include/fxge/fx_dib.h File core/include/fxge/fx_dib.h (right): https://codereview.chromium.org/810883005/diff/20001/core/include/fxge/fx_dib.h#newcode416 core/include/fxge/fx_dib.h:416: virtual ~CFX_ScanlineCompositor(); On 2015/01/09 00:20:49, brucedawson wrote: > This ...
5 years, 11 months ago (2015-01-09 01:16:53 UTC) #8
Tom Sepez
Warnings back now that I pulled some of the declarations we thought were not required. ...
5 years, 11 months ago (2015-01-09 01:21:42 UTC) #9
Tom Sepez
Bruce, are we good to go with ps#4?
5 years, 11 months ago (2015-01-09 17:40:49 UTC) #10
brucedawson
lgtm
5 years, 11 months ago (2015-01-09 18:30:08 UTC) #11
Tom Sepez
5 years, 11 months ago (2015-01-09 18:46:55 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
b9e0190938f62bf21df078e47190a62ba33ddab2 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698