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

Issue 1128043009: Abort on OOM by default in FX_Alloc() (Closed)

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

Description

Abort on OOM by default in FX_Alloc(). Add a FX_TryAlloc() for those few cases where we might need to continue in face of OOM. Remove FX_AllocNL() (the context of its use would suggest that NL means "No Limit"). This is used for some big allocations, so replace it with TryAlloc(). Large allocations may be worth trying to continue from, since there are few and they have a large chance of failing. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9f6f34892fdfff87c49a9df4c1e34790c0fa1272

Patch Set 1 #

Patch Set 2 : Line wrap. #

Patch Set 3 : Remove NL forms, use Try instead. #

Total comments: 2

Patch Set 4 : Rebase, 2015. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -24 lines) Patch
M BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fxcrt/fx_memory.h View 1 2 3 2 chunks +45 lines, -8 lines 0 comments Download
M core/include/fxcrt/fx_system.h View 1 2 chunks +13 lines, -3 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcrt/fx_basic_memmgr.cpp View 2 chunks +9 lines, -6 lines 0 comments Download
A core/src/fxcrt/fx_basic_memmgr_unittest.cpp View 1 2 3 1 chunk +47 lines, -0 lines 0 comments Download
M core/src/fxge/dib/fx_dib_convert.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxge/dib/fx_dib_engine.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fxge/dib/fx_dib_main.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pdfium.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Tom Sepez
Lei, for review.
5 years, 7 months ago (2015-05-15 18:40:08 UTC) #2
Lei Zhang
lgtm https://codereview.chromium.org/1128043009/diff/40001/core/src/fxcrt/fx_basic_memmgr_unittest.cpp File core/src/fxcrt/fx_basic_memmgr_unittest.cpp (right): https://codereview.chromium.org/1128043009/diff/40001/core/src/fxcrt/fx_basic_memmgr_unittest.cpp#newcode1 core/src/fxcrt/fx_basic_memmgr_unittest.cpp:1: // Copyright 2014 PDFium Authors. All rights reserved. ...
5 years, 7 months ago (2015-05-15 22:02:50 UTC) #3
Tom Sepez
https://codereview.chromium.org/1128043009/diff/40001/core/src/fxcrt/fx_basic_memmgr_unittest.cpp File core/src/fxcrt/fx_basic_memmgr_unittest.cpp (right): https://codereview.chromium.org/1128043009/diff/40001/core/src/fxcrt/fx_basic_memmgr_unittest.cpp#newcode1 core/src/fxcrt/fx_basic_memmgr_unittest.cpp:1: // Copyright 2014 PDFium Authors. All rights reserved. On ...
5 years, 7 months ago (2015-05-15 22:07:13 UTC) #4
Tom Sepez
5 years, 7 months ago (2015-05-15 22:07:24 UTC) #5
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
9f6f34892fdfff87c49a9df4c1e34790c0fa1272 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698