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

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed)

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

Description

Patch Set 1 #

Total comments: 4

Patch Set 2 : self review #

Total comments: 34

Patch Set 3 : nits #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+957 lines, -1037 lines) Patch
M core/include/fpdfapi/fpdf_resource.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M core/include/fxcrt/fx_basic.h View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M core/src/fdrm/crypto/fx_crypt_sha.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp View 8 chunks +8 lines, -8 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp View 6 chunks +7 lines, -7 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font.cpp View 13 chunks +14 lines, -17 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 2 3 12 chunks +16 lines, -16 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/ttgsubtable.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page.cpp View 1 2 3 5 chunks +7 lines, -10 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp View 1 2 15 chunks +20 lines, -22 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 2 3 14 chunks +18 lines, -18 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp View 1 2 12 chunks +17 lines, -20 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 21 chunks +24 lines, -24 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render.cpp View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp View 1 2 3 9 chunks +11 lines, -11 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp View 11 chunks +12 lines, -12 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp View 1 2 3 10 chunks +13 lines, -13 lines 0 comments Download
M core/src/fpdfdoc/doc_action.cpp View 1 2 3 10 chunks +13 lines, -16 lines 0 comments Download
M core/src/fpdfdoc/doc_annot.cpp View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfdoc/doc_ap.cpp View 1 2 3 5 chunks +5 lines, -8 lines 0 comments Download
M core/src/fpdfdoc/doc_basic.cpp View 1 2 3 6 chunks +15 lines, -15 lines 0 comments Download
M core/src/fpdfdoc/doc_form.cpp View 1 2 3 24 chunks +40 lines, -56 lines 0 comments Download
M core/src/fpdfdoc/doc_formcontrol.cpp View 1 2 3 8 chunks +13 lines, -14 lines 0 comments Download
M core/src/fpdfdoc/doc_formfield.cpp View 14 chunks +31 lines, -31 lines 0 comments Download
M core/src/fpdfdoc/doc_ocg.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfdoc/doc_tagged.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M core/src/fpdfdoc/doc_utils.cpp View 1 2 3 27 chunks +51 lines, -57 lines 0 comments Download
M core/src/fpdftext/fpdf_text.cpp View 1 2 3 4 chunks +9 lines, -9 lines 0 comments Download
M core/src/fpdftext/fpdf_text_int.cpp View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdftext/fpdf_text_search.cpp View 1 2 3 1 chunk +2 lines, -7 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcodec/codec/fx_codec_flate.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec_icc.cpp View 9 chunks +12 lines, -12 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec_jpeg.cpp View 1 2 3 chunks +4 lines, -5 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec_jpx_opj.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fxcrt/fx_basic_array.cpp View 1 2 9 chunks +12 lines, -14 lines 0 comments Download
M core/src/fxcrt/fx_basic_bstring.cpp View 28 chunks +44 lines, -44 lines 0 comments Download
M core/src/fxcrt/fx_basic_gcc.cpp View 5 chunks +5 lines, -5 lines 0 comments Download
M core/src/fxcrt/fx_basic_list.cpp View 1 2 3 3 chunks +3 lines, -7 lines 0 comments Download
M core/src/fxcrt/fx_basic_maps.cpp View 1 2 3 8 chunks +8 lines, -8 lines 0 comments Download
M core/src/fxcrt/fx_basic_util.cpp View 10 chunks +10 lines, -10 lines 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 1 2 3 28 chunks +51 lines, -58 lines 0 comments Download
M core/src/fxcrt/fx_extension.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M core/src/fxcrt/fx_xml_parser.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fxge/agg/src/fx_agg_driver.cpp View 1 2 3 17 chunks +33 lines, -31 lines 0 comments Download
M core/src/fxge/android/fpf_skiafontmgr.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxge/dib/fx_dib_composite.cpp View 49 chunks +129 lines, -135 lines 0 comments Download
M core/src/fxge/dib/fx_dib_convert.cpp View 8 chunks +12 lines, -12 lines 0 comments Download
M core/src/fxge/dib/fx_dib_engine.cpp View 1 2 7 chunks +8 lines, -11 lines 0 comments Download
M core/src/fxge/dib/fx_dib_main.cpp View 1 2 3 27 chunks +34 lines, -34 lines 0 comments Download
M core/src/fxge/dib/fx_dib_transform.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxge/ge/fx_ge.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxge/ge/fx_ge_device.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxge/ge/fx_ge_font.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fxge/ge/fx_ge_fontmap.cpp View 14 chunks +15 lines, -18 lines 0 comments Download
M core/src/fxge/ge/fx_ge_path.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxge/ge/fx_ge_ps.cpp View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M core/src/fxge/ge/fx_ge_text.cpp View 1 2 3 11 chunks +11 lines, -11 lines 0 comments Download
M core/src/fxge/skia/fx_skia_blitter_new.cpp View 4 chunks +12 lines, -12 lines 0 comments Download
M core/src/fxge/skia/fx_skia_device.cpp View 1 2 3 6 chunks +20 lines, -18 lines 0 comments Download
M core/src/fxge/win32/fx_win32_device.cpp View 1 2 3 11 chunks +12 lines, -13 lines 0 comments Download
M core/src/fxge/win32/fx_win32_dib.cpp View 4 chunks +11 lines, -11 lines 0 comments Download
M core/src/fxge/win32/fx_win32_dwrite.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxge/win32/fx_win32_gdipext.cpp View 1 2 3 6 chunks +9 lines, -9 lines 0 comments Download
M core/src/fxge/win32/fx_win32_print.cpp View 1 2 3 8 chunks +8 lines, -8 lines 0 comments Download
M fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp View 5 chunks +6 lines, -6 lines 0 comments Download
M fpdfsdk/src/fpdf_dataavail.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdf_sysfontinfo.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/fpdf_transformpage.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/fpdftext.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 1 2 3 6 chunks +9 lines, -17 lines 0 comments Download
M fpdfsdk/src/fsdk_baseannot.cpp View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M fpdfsdk/src/fxedit/fxet_edit.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/Document.cpp View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Value.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
Lei Zhang
And after foo != NULL, do bar == NULL. https://codereview.chromium.org/1520063002/diff/1/core/include/fxcrt/fx_basic.h File core/include/fxcrt/fx_basic.h (right): https://codereview.chromium.org/1520063002/diff/1/core/include/fxcrt/fx_basic.h#newcode897 core/include/fxcrt/fx_basic.h:897: ...
5 years ago (2015-12-12 02:31:44 UTC) #2
Tom Sepez
Great. I was planning on doing this recently, too. https://codereview.chromium.org/1520063002/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (right): https://codereview.chromium.org/1520063002/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#newcode723 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:723: ...
5 years ago (2015-12-14 18:27:01 UTC) #3
Lei Zhang
https://codereview.chromium.org/1520063002/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (right): https://codereview.chromium.org/1520063002/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#newcode723 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:723: return pos ? (CPDF_PageObject*)m_ObjectList.GetAt(pos) : nullptr; On 2015/12/14 18:27:00, ...
5 years ago (2015-12-15 01:58:36 UTC) #4
Tom Sepez
lgtm
5 years ago (2015-12-15 02:06:09 UTC) #5
Lei Zhang
5 years ago (2015-12-15 02:29:33 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
e385244f8cd6ae376f6b3cf1265a0795d5d30eff (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698