Changeset 164261 in webkit for trunk/Source/JavaScriptCore/parser


Ignore:
Timestamp:
Feb 17, 2014, 5:32:18 PM (11 years ago)
Author:
[email protected]
Message:

Remove ENABLE_GLOBAL_FASTMALLOC_NEW
https://bugs.webkit.org/show_bug.cgi?id=127067

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • parser/Nodes.h:

Source/WebCore:

  • platform/Timer.h:

Source/WTF:

Remove the global operator new/operator delete overrides. Having ALWAYS_INLINE operators
like we do is really undefined behavior according to the C++ standard and we've been lucky enough
to get away with it so far, but any code that calls operator new/operator delete inside from the C++ standard
library (not from headers that are included) will be mismatched and potentially crash. libc++ calls
delete in it's std::thread implementation for example.

The only supported way to override operator new and operator delete globally is to not use inline
functions, but that would mean that any application using WebKit would not be able to provide custom
operator new/operator delete functions so we'll just reuse the already existing infrastructure consisting
of the WTF_MAKE_FAST_ALLOCATED macro.

  • wtf/FastMalloc.cpp:

(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

  • wtf/FastMalloc.h:
  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r164139 r164261  
    113113
    114114    class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> {
    115         WTF_FASTMALLOC_OPERATORS;
     115        WTF_MAKE_FAST_ALLOCATED;
    116116    protected:
    117117        ParserArenaRefCounted(VM*);
Note: See TracChangeset for help on using the changeset viewer.