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

Issue 22038002: Get rid of the tryFast*alloc API. (Closed)

Created:
7 years, 4 months ago by Chris Evans
Modified:
7 years, 4 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, Nils Barth (inactive), jamesr, kojih, loislo+blink_chromium.org, jsbell+bindings_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, abarth-chromium, danakj, marja+watch_chromium.org, dglazkov+blink, Rik, adamk+blink_chromium.org, haraken, Stephen Chennney, Nate Chapin, jeez, pdr., do-not-use, gavinp+loader_chromium.org
Visibility:
Public.

Description

Get rid of the tryFast*alloc API. Also removes WTF_MALLOC_VALIDATION, which we do not use and therefore the complexity it adds is unwelcome. There are various benefits: 1) The standard ones from having less code and less complexity. 2) The API doesn't actually work, so every new caller becomes a possible bug. On (at least) Linux and Windows, our underlying malloc is tcmalloc which is hard-wired to crash on allocation failure. So tryFast*alloc can never return a fail for most of our users. 3) We've removed an inconsistency between platforms: I think tryFast*alloc might actually work as advertised on Mac, because of the built-in copy of tcmalloc. This also removes 500KB of guff from the Linux x64 chrome debug binary. A negligible effect on the release binary, sadly. BUG=none TEST=compile, webkit_tests pass Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155495

Patch Set 1 #

Patch Set 2 : Fix compile. #

Total comments: 2

Patch Set 3 : Review item. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -496 lines) Patch
M Source/bindings/v8/ArrayValue.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/ScriptScope.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M Source/bindings/v8/WrapperTypeInfo.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp View 2 chunks +8 lines, -8 lines 0 comments Download
M Source/core/loader/NavigationPolicy.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/platform/ScrollTypes.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/platform/audio/Distance.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/platform/audio/VectorMath.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/platform/graphics/FontWidthVariant.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/platform/graphics/GraphicsTypes3D.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/platform/graphics/UnitBezier.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/platform/mac/BlockExceptions.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/wtf/ArrayBufferContents.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/ArrayBufferContents.cpp View 5 chunks +8 lines, -16 lines 0 comments Download
M Source/wtf/FastAllocBase.h View 2 chunks +2 lines, -10 lines 0 comments Download
M Source/wtf/FastMalloc.h View 4 chunks +2 lines, -172 lines 0 comments Download
M Source/wtf/FastMalloc.cpp View 1 2 10 chunks +22 lines, -286 lines 0 comments Download
M Source/wtf/PageAllocator.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M public/platform/WebDeviceMotionData.h View 1 chunk +2 lines, -0 lines 0 comments Download
M public/platform/WebDeviceOrientationData.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Chris Evans
7 years, 4 months ago (2013-08-04 18:33:37 UTC) #1
abarth-chromium
LGTM I'm not 100% sure about changing CRASH to IMMEDIATE_CRASH. Maybe that should be a ...
7 years, 4 months ago (2013-08-04 19:21:31 UTC) #2
Chris Evans
Sounds reasonable. There's another minor optimization we could make in the same function so I'll ...
7 years, 4 months ago (2013-08-04 20:31:27 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cevans@chromium.org/22038002/13001
7 years, 4 months ago (2013-08-04 20:36:46 UTC) #4
commit-bot: I haz the power
7 years, 4 months ago (2013-08-04 23:58:08 UTC) #5
Message was sent while issue was closed.
Change committed as 155495

Powered by Google App Engine
This is Rietveld 408576698