Ignore:
Timestamp:
Aug 12, 2008, 1:54:12 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

  • JavaScriptCore part of <rdar://problem/6121636> Make fast*alloc() abort() on failure and add "try" variants that return NULL on failure.

Reviewed by Darin Adler.

  • JavaScriptCore.exp: Exported tryFastCalloc().
  • VM/RegisterFile.h: (KJS::RegisterFile::RegisterFile): Removed an ASSERT().
  • kjs/JSArray.cpp: (KJS::JSArray::putSlowCase): Changed to use tryFastRealloc(). (KJS::JSArray::increaseVectorLength): Ditto.
  • kjs/ustring.cpp: (KJS::allocChars): Changed to use tryFastMalloc(). (KJS::reallocChars): Changed to use tryFastRealloc().
  • wtf/FastMalloc.cpp: (WTF::fastZeroedMalloc): Removed null checking of fastMalloc()'s result and removed extra call to InvokeNewHook(). (WTF::tryFastZeroedMalloc): Added. Uses tryFastMalloc(). (WTF::tryFastMalloc): Renamed fastMalloc() to this. (WTF::fastMalloc): Added. This version abort()s if allocation fails. (WTF::tryFastCalloc): Renamed fastCalloc() to this. (WTF::fastCalloc): Added. This version abort()s if allocation fails. (WTF::tryFastRealloc): Renamed fastRealloc() to this. (WTF::fastRealloc): Added. This version abort()s if allocation fails. (WTF::do_malloc): Made this a function template. When the abortOnFailure template parameter is set, the function abort()s on failure to allocate. Otherwise, it sets errno to ENOMEM and returns zero. (WTF::TCMallocStats::fastMalloc): Defined to abort() on failure. (WTF::TCMallocStats::tryFastMalloc): Added. Does not abort() on failure. (WTF::TCMallocStats::fastCalloc): Defined to abort() on failure. (WTF::TCMallocStats::tryFastCalloc): Added. Does not abort() on failure. (WTF::TCMallocStats::fastRealloc): Defined to abort() on failure. (WTF::TCMallocStats::tryFastRealloc): Added. Does not abort() on failure.
  • wtf/FastMalloc.h: Declared the "try" variants.

WebCore:

  • WebCore part of <rdar://problem/6121636> Make fast*alloc() abort() on failure and add "try" variants that return NULL on failure.

Reviewed by Darin Adler.

  • platform/Arena.cpp: (WebCore::ArenaAllocate): Removed null checking of fastMalloc()'s result.
  • platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::create): Changed to use tryFastCalloc().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r35652 r35691  
    216216__ZN3KJS8JSObject3putEPNS_9ExecStateEjPNS_7JSValueE
    217217__ZN3KJS8JSObject4markEv
    218 __ZN3KJS8Profiler21didFinishAllExecutionEPNS_9ExecStateE
    219218__ZN3KJS8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE
    220219__ZN3KJS8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringEPNS_14ProfilerClientE
     220__ZN3KJS8Profiler21didFinishAllExecutionEPNS_9ExecStateE
    221221__ZN3KJS8Profiler8profilerEv
    222222__ZN3KJS8jsStringEPNS_9ExecStateEPKc
     
    234234__ZN3WTF12isMainThreadEv
    235235__ZN3WTF13currentThreadEv
     236__ZN3WTF13tryFastCallocEmm
    236237__ZN3WTF15ThreadCondition4waitERNS_5MutexE
    237238__ZN3WTF15ThreadCondition6signalEv
Note: See TracChangeset for help on using the changeset viewer.