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

Issue 1393303004: Remove some checks for object creation failures. They cannot fail. (Closed)

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

Description

Remove some checks for object creation failures. They cannot fail. Also reduce nesting in if statements, remove CFX_SmartPointer, and use more unique_ptrs. R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/6101a5f98b27888f1736ae74982ed4d409d83be0

Patch Set 1 #

Patch Set 2 : Remove CFX_SmartPointer, add helper functions #

Patch Set 3 : More unique_ptr #

Patch Set 4 : nits #

Total comments: 22

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -271 lines) Patch
M core/include/fxcrt/fx_basic.h View 1 1 chunk +0 lines, -14 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 4 21 chunks +226 lines, -257 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Lei Zhang
Well, it started as Create() can't fail, and ended in unique_ptrs gone wild.
5 years, 2 months ago (2015-10-09 05:22:05 UTC) #2
Tom Sepez
On 2015/10/09 05:22:05, Lei Zhang wrote: > Well, it started as Create() can't fail, and ...
5 years, 2 months ago (2015-10-09 16:15:22 UTC) #3
Tom Sepez
https://codereview.chromium.org/1393303004/diff/60001/core/include/fxcrt/fx_basic.h File core/include/fxcrt/fx_basic.h (left): https://codereview.chromium.org/1393303004/diff/60001/core/include/fxcrt/fx_basic.h#oldcode960 core/include/fxcrt/fx_basic.h:960: class CFX_SmartPointer { This gets replaced with a ReleaseDelete, ...
5 years, 2 months ago (2015-10-09 16:47:32 UTC) #4
Lei Zhang
https://codereview.chromium.org/1393303004/diff/60001/core/include/fxcrt/fx_basic.h File core/include/fxcrt/fx_basic.h (left): https://codereview.chromium.org/1393303004/diff/60001/core/include/fxcrt/fx_basic.h#oldcode960 core/include/fxcrt/fx_basic.h:960: class CFX_SmartPointer { On 2015/10/09 16:47:31, Tom Sepez wrote: ...
5 years, 2 months ago (2015-10-19 08:05:52 UTC) #5
Tom Sepez
lgtm
5 years, 2 months ago (2015-10-19 16:10:42 UTC) #6
Lei Zhang
5 years, 2 months ago (2015-10-19 18:52:31 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
6101a5f98b27888f1736ae74982ed4d409d83be0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698