Changeset 195304 in webkit


Ignore:
Timestamp:
Jan 19, 2016 12:16:01 PM (8 years ago)
Author:
Chris Dumez
Message:

Unreviewed, rolling out r195141.

Seems to cause crashes on iOS9 64bit

Reverted changeset:

"Fragmentation-free allocator for timeless and/or coupled
allocations."
https://bugs.webkit.org/show_bug.cgi?id=152696
http://trac.webkit.org/changeset/195141

Location:
trunk/Source
Files:
2 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r195300 r195304  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r195141.
     4
     5        Seems to cause crashes on iOS9 64bit
     6
     7        Reverted changeset:
     8
     9        "Fragmentation-free allocator for timeless and/or coupled
     10        allocations."
     11        https://bugs.webkit.org/show_bug.cgi?id=152696
     12        http://trac.webkit.org/changeset/195141
     13
    1142016-01-19  Enrica Casucci  <enrica@apple.com>
    215
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj

    r195142 r195304  
    5454    <ClCompile Include="..\wtf\Assertions.cpp" />
    5555    <ClCompile Include="..\wtf\BitVector.cpp" />
    56     <ClCompile Include="..\wtf\BumpArena.cpp" />
    5756    <ClCompile Include="..\wtf\CompilationThread.cpp" />
    5857    <ClCompile Include="..\wtf\CryptographicUtilities.cpp" />
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters

    r195141 r195304  
    119119    </ClCompile>
    120120    <ClCompile Include="..\wtf\BitVector.cpp">
    121       <Filter>wtf</Filter>
    122     </ClCompile>
    123     <ClCompile Include="..\wtf\BumpArena.cpp">
    124121      <Filter>wtf</Filter>
    125122    </ClCompile>
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r195142 r195304  
    289289                A8A47487151A825B004123FF /* WTFThreadData.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4737B151A825B004123FF /* WTFThreadData.h */; };
    290290                A8A4748C151A8264004123FF /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4748B151A8264004123FF /* config.h */; };
    291                 AD9C50C11C3C1D5D005FBF1E /* BumpArena.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD9C50BF1C3C1D5D005FBF1E /* BumpArena.cpp */; };
    292                 AD9C50C21C3C1D5D005FBF1E /* BumpArena.h in Headers */ = {isa = PBXBuildFile; fileRef = AD9C50C01C3C1D5D005FBF1E /* BumpArena.h */; settings = {ATTRIBUTES = (Private, ); }; };
    293291                B38FD7BD168953E80065C969 /* FeatureDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = B38FD7BC168953E80065C969 /* FeatureDefines.h */; };
    294292                C4F8A93719C65EB400B2B15D /* Stopwatch.h in Headers */ = {isa = PBXBuildFile; fileRef = C4F8A93619C65EB400B2B15D /* Stopwatch.h */; };
     
    605603                A8A4737B151A825B004123FF /* WTFThreadData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFThreadData.h; sourceTree = "<group>"; };
    606604                A8A4748B151A8264004123FF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
    607                 AD9C50BF1C3C1D5D005FBF1E /* BumpArena.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BumpArena.cpp; sourceTree = "<group>"; };
    608                 AD9C50C01C3C1D5D005FBF1E /* BumpArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpArena.h; sourceTree = "<group>"; };
    609605                B38FD7BC168953E80065C969 /* FeatureDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeatureDefines.h; sourceTree = "<group>"; };
    610606                C4F8A93619C65EB400B2B15D /* Stopwatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stopwatch.h; sourceTree = "<group>"; };
     
    764760                                0F93274A1C17F4B700CF6564 /* Box.h */,
    765761                                0F4570441BE834410062A629 /* BubbleSort.h */,
    766                                 AD9C50BF1C3C1D5D005FBF1E /* BumpArena.cpp */,
    767                                 AD9C50C01C3C1D5D005FBF1E /* BumpArena.h */,
    768762                                A8A47267151A825A004123FF /* BumpPointerAllocator.h */,
    769763                                EB95E1EF161A72410089A2F5 /* ByteOrder.h */,
     
    12721266                                A8A4743F151A825B004123FF /* StringHash.h in Headers */,
    12731267                                A748745417A0BDAE00FA04CB /* StringHashDumpContext.h in Headers */,
    1274                                 AD9C50C21C3C1D5D005FBF1E /* BumpArena.h in Headers */,
    12751268                                A8A47441151A825B004123FF /* StringImpl.h in Headers */,
    12761269                                A8A47442151A825B004123FF /* StringOperators.h in Headers */,
     
    14161409                                9BC70F05176C379D00101DEC /* AtomicStringTable.cpp in Sources */,
    14171410                                1469419D16EAB10A0024E146 /* AutodrainedPoolMac.mm in Sources */,
    1418                                 AD9C50C11C3C1D5D005FBF1E /* BumpArena.cpp in Sources */,
    14191411                                8134013815B092FD001FF0B8 /* Base64.cpp in Sources */,
    14201412                                A8A473A8151A825B004123FF /* bignum-dtoa.cc in Sources */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r195183 r195304  
    88    Bitmap.h
    99    BubbleSort.h
    10     BumpArena.h
    1110    BumpPointerAllocator.h
    1211    ByteOrder.h
     
    156155    Atomics.cpp
    157156    BitVector.cpp
    158     BumpArena.cpp
    159157    CompilationThread.cpp
    160158    CryptographicUtilities.cpp
  • trunk/Source/WebCore/ChangeLog

    r195302 r195304  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r195141.
     4
     5        Seems to cause crashes on iOS9 64bit
     6
     7        Reverted changeset:
     8
     9        "Fragmentation-free allocator for timeless and/or coupled
     10        allocations."
     11        https://bugs.webkit.org/show_bug.cgi?id=152696
     12        http://trac.webkit.org/changeset/195141
     13
    1142015-12-07  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/css/CSSGrammar.y.in

    r195179 r195304  
    404404        if ($4) {
    405405            if (parser->m_selectorListForParseSelector)
    406                 parser->m_selectorListForParseSelector->adoptSelectorVector(parser->arena(), *$4);
     406                parser->m_selectorListForParseSelector->adoptSelectorVector(*$4);
    407407            parser->recycleSelectorVector(std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
    408408        }
     
    13541354    // used by ::cue(:past/:future)
    13551355    | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space ')' {
    1356         $$ = CSSParserSelector::parsePseudoElementCueFunctionSelector(parser->arena(), $3, $5);
     1356        $$ = CSSParserSelector::parsePseudoElementCueFunctionSelector($3, $5);
    13571357    }
    13581358#endif
     
    13671367            auto selector = std::make_unique<CSSParserSelector>();
    13681368            selector->setMatch(CSSSelector::PseudoClass);
    1369             selector->adoptSelectorVector(parser->arena(), *std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
     1369            selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
    13701370            selector->setPseudoClassValue($2);
    13711371            if (selector->pseudoClassType() == CSSSelector::PseudoClassAny)
     
    13781378            auto selector = std::make_unique<CSSParserSelector>();
    13791379            selector->setMatch(CSSSelector::PseudoClass);
    1380             selector->adoptSelectorVector(parser->arena(), *std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
     1380            selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($4));
    13811381            selector->setPseudoClassValue($2);
    13821382            if (selector->pseudoClassType() == CSSSelector::PseudoClassMatches)
     
    14281428            selector->setPseudoClassValue($2);
    14291429            if (ending)
    1430                 selector->adoptSelectorVector(parser->arena(), *ending);
     1430                selector->adoptSelectorVector(*ending);
    14311431            CSSSelector::PseudoClassType pseudoClassType = selector->pseudoClassType();
    14321432            if (pseudoClassType == CSSSelector::PseudoClassNthChild || pseudoClassType == CSSSelector::PseudoClassNthLastChild)
     
    14431443            selector->setPseudoClassValue($2);
    14441444            if (ending)
    1445                 selector->adoptSelectorVector(parser->arena(), *ending);
     1445                selector->adoptSelectorVector(*ending);
    14461446            CSSSelector::PseudoClassType pseudoClassType = selector->pseudoClassType();
    14471447            if (pseudoClassType == CSSSelector::PseudoClassNthChild || pseudoClassType == CSSSelector::PseudoClassNthLastChild)
     
    14581458            selector->setPseudoClassValue($2);
    14591459            if (ending)
    1460                selector->adoptSelectorVector(parser->arena(), *ending);
     1460               selector->adoptSelectorVector(*ending);
    14611461            CSSSelector::PseudoClassType pseudoClassType = selector->pseudoClassType();
    14621462            if (pseudoClassType == CSSSelector::PseudoClassNthChild || pseudoClassType == CSSSelector::PseudoClassNthLastChild)
     
    15121512                selector->setMatch(CSSSelector::PseudoClass);
    15131513                selector->setPseudoClassValue($2);
    1514                 selector->adoptSelectorVector(parser->arena(), *list);
     1514                selector->adoptSelectorVector(*list);
    15151515                if (selector->pseudoClassType() == CSSSelector::PseudoClassNot)
    15161516                    $$ = selector.release();
  • trunk/Source/WebCore/css/CSSKeyframesRule.h

    r195141 r195304  
    4141class StyleRuleKeyframes : public StyleRuleBase {
    4242public:
    43     static Ref<StyleRuleKeyframes> create(BumpArena* arena) { return adoptRef(*new (arena) StyleRuleKeyframes); }
     43    static Ref<StyleRuleKeyframes> create() { return adoptRef(*new StyleRuleKeyframes()); }
    4444   
    4545    ~StyleRuleKeyframes();
  • trunk/Source/WebCore/css/CSSParser.cpp

    r195141 r195304  
    16451645        results.remove(0, unusedEntries);
    16461646
    1647     return ImmutableStyleProperties::create(arena(), results.data(), results.size(), m_context.mode);
     1647    return ImmutableStyleProperties::create(results.data(), results.size(), m_context.mode);
    16481648}
    16491649
     
    1270212702        // To comply with w3c test suite expectation, create an empty media query
    1270312703        // even when it is syntactically incorrect.
    12704         rule = StyleRuleMedia::create(arena(), MediaQuerySet::create(), emptyRules);
     12704        rule = StyleRuleMedia::create(MediaQuerySet::create(), emptyRules);
    1270512705    } else
    12706         rule = StyleRuleMedia::create(arena(), media, rules ? *rules : emptyRules);
     12706        rule = StyleRuleMedia::create(media, rules ? *rules : emptyRules);
    1270712707    processAndAddNewRuleToSourceTreeIfNeeded();
    1270812708    return rule;
     
    1273012730
    1273112731    if (rules)
    12732         rule = StyleRuleSupports::create(arena(), conditionText, conditionIsSupported, *rules);
     12732        rule = StyleRuleSupports::create(conditionText, conditionIsSupported, *rules);
    1273312733    else {
    1273412734        RuleList emptyRules;
    12735         rule = StyleRuleSupports::create(arena(), conditionText, conditionIsSupported, emptyRules);
     12735        rule = StyleRuleSupports::create(conditionText, conditionIsSupported, emptyRules);
    1273612736    }
    1273712737
     
    1284212842    std::unique_ptr<Vector<RefPtr<StyleKeyframe>>> keyframes = WTFMove(popKeyframes);
    1284312843    m_allowImportRules = m_allowNamespaceDeclarations = false;
    12844     RefPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create(arena());
     12844    RefPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create();
    1284512845    for (size_t i = 0; i < keyframes->size(); ++i)
    1284612846        rule->parserAppendKeyframe(keyframes->at(i));
     
    1285012850}
    1285112851
    12852 void CSSParser::setArena(BumpArena& arena)
    12853 {
    12854     m_arena = &arena;
    12855 }
    12856 
    12857 BumpArena* CSSParser::arena()
    12858 {
    12859     return m_arena.get();
    12860 }
    12861 
    1286212852RefPtr<StyleRuleBase> CSSParser::createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors)
    1286312853{
     
    1286612856        m_allowImportRules = false;
    1286712857        m_allowNamespaceDeclarations = false;
    12868         rule = StyleRule::create(arena(), m_lastSelectorLineNumber, createStyleProperties());
    12869         rule->parserAdoptSelectorVector(arena(), *selectors);
     12858        rule = StyleRule::create(m_lastSelectorLineNumber, createStyleProperties());
     12859        rule->parserAdoptSelectorVector(*selectors);
    1287012860        processAndAddNewRuleToSourceTreeIfNeeded();
    1287112861    } else
     
    1289012880        }
    1289112881    }
    12892     RefPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(arena(), createStyleProperties());
     12882    RefPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(createStyleProperties());
    1289312883    clearProperties();
    1289412884    processAndAddNewRuleToSourceTreeIfNeeded();
     
    1297412964    RefPtr<StyleRulePage> rule;
    1297512965    if (pageSelector) {
    12976         rule = StyleRulePage::create(arena(), createStyleProperties());
     12966        rule = StyleRulePage::create(createStyleProperties());
    1297712967        Vector<std::unique_ptr<CSSParserSelector>> selectorVector;
    1297812968        selectorVector.append(WTFMove(pageSelector));
    12979         rule->parserAdoptSelectorVector(arena(), selectorVector);
     12969        rule->parserAdoptSelectorVector(selectorVector);
    1298012970        processAndAddNewRuleToSourceTreeIfNeeded();
    1298112971    } else
     
    1300912999    m_allowImportRules = m_allowNamespaceDeclarations = false;
    1301013000
    13011     RefPtr<StyleRuleRegion> regionRule = StyleRuleRegion::create(arena(), regionSelector, *rules);
     13001    RefPtr<StyleRuleRegion> regionRule = StyleRuleRegion::create(regionSelector, *rules);
    1301213002
    1301313003    if (isExtractingSourceData())
     
    1328313273    m_allowImportRules = m_allowNamespaceDeclarations = false;
    1328413274
    13285     RefPtr<StyleRuleViewport> rule = StyleRuleViewport::create(arena(), createStyleProperties());
     13275    RefPtr<StyleRuleViewport> rule = StyleRuleViewport::create(createStyleProperties());
    1328613276    clearProperties();
    1328713277
  • trunk/Source/WebCore/css/CSSParser.h

    r195141 r195304  
    3737#include "WebKitCSSFilterValue.h"
    3838#include <memory>
    39 #include <wtf/BumpArena.h>
    4039#include <wtf/HashMap.h>
    4140#include <wtf/HashSet.h>
     
    116115    WEBCORE_EXPORT ~CSSParser();
    117116
    118     void setArena(BumpArena&);
    119 
    120117    void parseSheet(StyleSheetContents*, const String&, const TextPosition&, RuleSourceDataList*, bool logErrors);
    121118    RefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&);
     
    401398    CSSParserContext m_context;
    402399
    403     BumpArena* arena();
    404     RefPtr<BumpArena> m_arena;
    405400    bool m_important;
    406401    CSSPropertyID m_id;
  • trunk/Source/WebCore/css/CSSParserValues.cpp

    r195141 r195304  
    215215
    216216#if ENABLE(VIDEO_TRACK)
    217 CSSParserSelector* CSSParserSelector::parsePseudoElementCueFunctionSelector(BumpArena* arena, const CSSParserString& functionIdentifier, Vector<std::unique_ptr<CSSParserSelector>>* parsedSelectorVector)
     217CSSParserSelector* CSSParserSelector::parsePseudoElementCueFunctionSelector(const CSSParserString& functionIdentifier, Vector<std::unique_ptr<CSSParserSelector>>* parsedSelectorVector)
    218218{
    219219    ASSERT_UNUSED(functionIdentifier, String(functionIdentifier) == "cue(");
     
    227227    selector->m_selector->setMatch(CSSSelector::PseudoElement);
    228228    selector->m_selector->setPseudoElementType(CSSSelector::PseudoElementCue);
    229     selector->adoptSelectorVector(arena, *selectorVector);
     229    selector->adoptSelectorVector(*selectorVector);
    230230    return selector.release();
    231231}
     
    280280}
    281281
    282 void CSSParserSelector::adoptSelectorVector(BumpArena* arena, Vector<std::unique_ptr<CSSParserSelector>>& selectorVector)
     282void CSSParserSelector::adoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectorVector)
    283283{
    284284    auto selectorList = std::make_unique<CSSSelectorList>();
    285     selectorList->adoptSelectorVector(arena, selectorVector);
     285    selectorList->adoptSelectorVector(selectorVector);
    286286    m_selector->setSelectorList(WTFMove(selectorList));
    287287}
  • trunk/Source/WebCore/css/CSSParserValues.h

    r195141 r195304  
    2525#include "CSSValueKeywords.h"
    2626#include "CSSValueList.h"
    27 #include <wtf/BumpArena.h>
    2827#include <wtf/text/AtomicString.h>
    2928#include <wtf/text/AtomicStringHash.h>
     
    213212    static CSSParserSelector* parsePagePseudoSelector(const CSSParserString& pseudoTypeString);
    214213    static CSSParserSelector* parsePseudoElementSelector(CSSParserString& pseudoTypeString);
    215     static CSSParserSelector* parsePseudoElementCueFunctionSelector(BumpArena*, const CSSParserString& functionIdentifier, Vector<std::unique_ptr<CSSParserSelector>>* selectorVector);
     214    static CSSParserSelector* parsePseudoElementCueFunctionSelector(const CSSParserString& functionIdentifier, Vector<std::unique_ptr<CSSParserSelector>>* selectorVector);
    216215    static CSSParserSelector* parsePseudoClassAndCompatibilityElementSelector(CSSParserString& pseudoTypeString);
    217216
     
    230229    void setForPage() { m_selector->setForPage(); }
    231230
    232     void adoptSelectorVector(BumpArena*, Vector<std::unique_ptr<CSSParserSelector>>& selectorVector);
     231    void adoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectorVector);
    233232    void setLangArgumentList(const Vector<CSSParserString>& stringVector);
    234233
  • trunk/Source/WebCore/css/CSSSelectorList.cpp

    r195141 r195304  
    3838    ASSERT_WITH_SECURITY_IMPLICATION(otherComponentCount);
    3939
    40     m_selectorArray = reinterpret_cast<CSSSelector*>(BumpArena::allocate(BumpArena::arenaFor(other.m_selectorArray), sizeof(CSSSelector) * otherComponentCount));
     40    m_selectorArray = reinterpret_cast<CSSSelector*>(fastMalloc(sizeof(CSSSelector) * otherComponentCount));
    4141    for (unsigned i = 0; i < otherComponentCount; ++i)
    4242        new (NotNull, &m_selectorArray[i]) CSSSelector(other.m_selectorArray[i]);
     
    5050}
    5151
    52 void CSSSelectorList::adoptSelectorVector(BumpArena* arena, Vector<std::unique_ptr<CSSParserSelector>>& selectorVector)
     52void CSSSelectorList::adoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectorVector)
    5353{
    5454    ASSERT_WITH_SECURITY_IMPLICATION(!selectorVector.isEmpty());
     
    6161    }
    6262    ASSERT(flattenedSize);
    63     m_selectorArray = reinterpret_cast<CSSSelector*>(BumpArena::allocate(arena, sizeof(CSSSelector) * flattenedSize));
     63    m_selectorArray = reinterpret_cast<CSSSelector*>(fastMalloc(sizeof(CSSSelector) * flattenedSize));
    6464    size_t arrayIndex = 0;
    6565    for (size_t i = 0; i < selectorVector.size(); ++i) {
     
    120120        s->~CSSSelector();
    121121    }
    122     BumpArena::deallocate(selectorArray);
     122    fastFree(selectorArray);
    123123}
    124124
  • trunk/Source/WebCore/css/CSSSelectorList.h

    r195141 r195304  
    2929#include "CSSSelector.h"
    3030#include <memory>
    31 #include <wtf/BumpArena.h>
    3231
    3332namespace WebCore {
     
    4443    ~CSSSelectorList() { deleteSelectors(); }
    4544
    46     void adoptSelectorVector(BumpArena*, Vector<std::unique_ptr<CSSParserSelector>>&);
     45    void adoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectorVector);
    4746    void adoptSelectorArray(CSSSelector* selectors) { ASSERT(!m_selectorArray); m_selectorArray = selectors; }
    4847
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r195141 r195304  
    5656}
    5757
    58 Ref<ImmutableStyleProperties> ImmutableStyleProperties::create(BumpArena* arena, const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
    59 {
    60     void* slot = BumpArena::allocate(arena, sizeForImmutableStylePropertiesWithPropertyCount(count));
     58Ref<ImmutableStyleProperties> ImmutableStyleProperties::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
     59{
     60    void* slot = WTF::fastMalloc(sizeForImmutableStylePropertiesWithPropertyCount(count));
    6161    return adoptRef(*new (NotNull, slot) ImmutableStyleProperties(properties, count, cssParserMode));
    6262}
     
    6767        return downcast<ImmutableStyleProperties>(const_cast<StyleProperties&>(*this));
    6868    const MutableStyleProperties& mutableThis = downcast<MutableStyleProperties>(*this);
    69     return ImmutableStyleProperties::create(BumpArena::arenaFor(this), mutableThis.m_propertyVector.data(), mutableThis.m_propertyVector.size(), cssParserMode());
     69    return ImmutableStyleProperties::create(mutableThis.m_propertyVector.data(), mutableThis.m_propertyVector.size(), cssParserMode());
    7070}
    7171
  • trunk/Source/WebCore/css/StyleProperties.h

    r195141 r195304  
    3030#include "CSSValueKeywords.h"
    3131#include <memory>
    32 #include <wtf/BumpArena.h>
    3332#include <wtf/ListHashSet.h>
    3433#include <wtf/TypeCasts.h>
     
    4847class StyleSheetContents;
    4948
    50 class StyleProperties : public WTF::RefCountedBase {
    51     WTF_MAKE_BUMPARENA_ALLOCATED;
     49class StyleProperties : public RefCounted<StyleProperties> {
    5250    friend class PropertyReference;
    5351public:
     
    164162public:
    165163    WEBCORE_EXPORT ~ImmutableStyleProperties();
    166     static Ref<ImmutableStyleProperties> create(BumpArena*, const CSSProperty* properties, unsigned count, CSSParserMode);
     164    static Ref<ImmutableStyleProperties> create(const CSSProperty* properties, unsigned count, CSSParserMode);
    167165
    168166    unsigned propertyCount() const { return m_arraySize; }
  • trunk/Source/WebCore/css/StyleRule.cpp

    r195141 r195304  
    220220}
    221221
    222 Ref<StyleRule> StyleRule::create(BumpArena* arena, int sourceLine, const Vector<const CSSSelector*>& selectors, Ref<StyleProperties>&& properties)
     222Ref<StyleRule> StyleRule::create(int sourceLine, const Vector<const CSSSelector*>& selectors, Ref<StyleProperties>&& properties)
    223223{
    224224    ASSERT_WITH_SECURITY_IMPLICATION(!selectors.isEmpty());
    225     CSSSelector* selectorListArray = reinterpret_cast<CSSSelector*>(BumpArena::allocate(arena, sizeof(CSSSelector) * selectors.size()));
     225    CSSSelector* selectorListArray = reinterpret_cast<CSSSelector*>(fastMalloc(sizeof(CSSSelector) * selectors.size()));
    226226    for (unsigned i = 0; i < selectors.size(); ++i)
    227227        new (NotNull, &selectorListArray[i]) CSSSelector(*selectors.at(i));
    228228    selectorListArray[selectors.size() - 1].setLastInSelectorList();
    229     auto rule = StyleRule::create(arena, sourceLine, WTFMove(properties));
     229    auto rule = StyleRule::create(sourceLine, WTFMove(properties));
    230230    rule.get().parserAdoptSelectorArray(selectorListArray);
    231231    return rule;
     
    245245
    246246        if (componentsInThisSelector.size() + componentsSinceLastSplit.size() > maxCount && !componentsSinceLastSplit.isEmpty()) {
    247             rules.append(create(BumpArena::arenaFor(this), sourceLine(), componentsSinceLastSplit, const_cast<StyleProperties&>(m_properties.get())));
     247            rules.append(create(sourceLine(), componentsSinceLastSplit, const_cast<StyleProperties&>(m_properties.get())));
    248248            componentsSinceLastSplit.clear();
    249249        }
     
    253253
    254254    if (!componentsSinceLastSplit.isEmpty())
    255         rules.append(create(BumpArena::arenaFor(this), sourceLine(), componentsSinceLastSplit, const_cast<StyleProperties&>(m_properties.get())));
     255        rules.append(create(sourceLine(), componentsSinceLastSplit, const_cast<StyleProperties&>(m_properties.get())));
    256256
    257257    return rules;
     
    361361    : StyleRuleGroup(Region, adoptRules)
    362362{
    363     m_selectorList.adoptSelectorVector(BumpArena::arenaFor(this), *selectors);
     363    m_selectorList.adoptSelectorVector(*selectors);
    364364}
    365365
  • trunk/Source/WebCore/css/StyleRule.h

    r195141 r195304  
    2626#include "MediaList.h"
    2727#include "StyleProperties.h"
    28 #include <wtf/BumpArena.h>
    2928#include <wtf/RefPtr.h>
    3029#include <wtf/TypeCasts.h>
     
    3938
    4039class StyleRuleBase : public WTF::RefCountedBase {
    41     WTF_MAKE_BUMPARENA_ALLOCATED;
     40    WTF_MAKE_FAST_ALLOCATED;
    4241public:
    4342    enum Type {
     
    103102
    104103class StyleRule : public StyleRuleBase {
    105 public:
    106     static Ref<StyleRule> create(BumpArena* arena, int sourceLine, Ref<StyleProperties>&& properties)
    107     {
    108         return adoptRef(*new (arena) StyleRule(sourceLine, WTFMove(properties)));
     104    WTF_MAKE_FAST_ALLOCATED;
     105public:
     106    static Ref<StyleRule> create(int sourceLine, Ref<StyleProperties>&& properties)
     107    {
     108        return adoptRef(*new StyleRule(sourceLine, WTFMove(properties)));
    109109    }
    110110   
     
    115115    MutableStyleProperties& mutableProperties();
    116116   
    117     void parserAdoptSelectorVector(BumpArena* arena, Vector<std::unique_ptr<CSSParserSelector>>& selectors) { m_selectorList.adoptSelectorVector(arena, selectors); }
     117    void parserAdoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectors) { m_selectorList.adoptSelectorVector(selectors); }
    118118    void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList = WTFMove(selectors); }
    119119    void parserAdoptSelectorArray(CSSSelector* selectors) { m_selectorList.adoptSelectorArray(selectors); }
     
    129129    StyleRule(const StyleRule&);
    130130
    131     static Ref<StyleRule> create(BumpArena*, int sourceLine, const Vector<const CSSSelector*>&, Ref<StyleProperties>&&);
     131    static Ref<StyleRule> create(int sourceLine, const Vector<const CSSSelector*>&, Ref<StyleProperties>&&);
    132132
    133133    Ref<StyleProperties> m_properties;
     
    137137class StyleRuleFontFace : public StyleRuleBase {
    138138public:
    139     static Ref<StyleRuleFontFace> create(BumpArena* arena, Ref<StyleProperties>&& properties) { return adoptRef(*new (arena) StyleRuleFontFace(WTFMove(properties))); }
     139    static Ref<StyleRuleFontFace> create(Ref<StyleProperties>&& properties) { return adoptRef(*new StyleRuleFontFace(WTFMove(properties))); }
    140140   
    141141    ~StyleRuleFontFace();
     
    156156class StyleRulePage : public StyleRuleBase {
    157157public:
    158     static Ref<StyleRulePage> create(BumpArena* arena, Ref<StyleProperties>&& properties) { return adoptRef(*new (arena) StyleRulePage(WTFMove(properties))); }
     158    static Ref<StyleRulePage> create(Ref<StyleProperties>&& properties) { return adoptRef(*new StyleRulePage(WTFMove(properties))); }
    159159
    160160    ~StyleRulePage();
     
    164164    MutableStyleProperties& mutableProperties();
    165165
    166     void parserAdoptSelectorVector(BumpArena* arena, Vector<std::unique_ptr<CSSParserSelector>>& selectors) { m_selectorList.adoptSelectorVector(arena, selectors); }
     166    void parserAdoptSelectorVector(Vector<std::unique_ptr<CSSParserSelector>>& selectors) { m_selectorList.adoptSelectorVector(selectors); }
    167167    void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList = WTFMove(selectors); }
    168168
     
    194194class StyleRuleMedia : public StyleRuleGroup {
    195195public:
    196     static Ref<StyleRuleMedia> create(BumpArena* arena, PassRefPtr<MediaQuerySet> media, Vector<RefPtr<StyleRuleBase>>& adoptRules)
    197     {
    198         return adoptRef(*new (arena) StyleRuleMedia(media, adoptRules));
     196    static Ref<StyleRuleMedia> create(PassRefPtr<MediaQuerySet> media, Vector<RefPtr<StyleRuleBase>>& adoptRules)
     197    {
     198        return adoptRef(*new StyleRuleMedia(media, adoptRules));
    199199    }
    200200
     
    212212class StyleRuleSupports : public StyleRuleGroup {
    213213public:
    214     static Ref<StyleRuleSupports> create(BumpArena* arena, const String& conditionText, bool conditionIsSupported, Vector<RefPtr<StyleRuleBase>>& adoptRules)
    215     {
    216         return adoptRef(*new (arena) StyleRuleSupports(conditionText, conditionIsSupported, adoptRules));
     214    static Ref<StyleRuleSupports> create(const String& conditionText, bool conditionIsSupported, Vector<RefPtr<StyleRuleBase>>& adoptRules)
     215    {
     216        return adoptRef(*new StyleRuleSupports(conditionText, conditionIsSupported, adoptRules));
    217217    }
    218218
     
    231231class StyleRuleRegion : public StyleRuleGroup {
    232232public:
    233     static Ref<StyleRuleRegion> create(BumpArena* arena, Vector<std::unique_ptr<CSSParserSelector>>* selectors, Vector<RefPtr<StyleRuleBase>>& adoptRules)
    234     {
    235         return adoptRef(*new (arena) StyleRuleRegion(selectors, adoptRules));
     233    static Ref<StyleRuleRegion> create(Vector<std::unique_ptr<CSSParserSelector>>* selectors, Vector<RefPtr<StyleRuleBase>>& adoptRules)
     234    {
     235        return adoptRef(*new StyleRuleRegion(selectors, adoptRules));
    236236    }
    237237
     
    250250class StyleRuleViewport : public StyleRuleBase {
    251251public:
    252     static Ref<StyleRuleViewport> create(BumpArena* arena, Ref<StyleProperties>&& properties) { return adoptRef(*new (arena) StyleRuleViewport(WTFMove(properties))); }
     252    static Ref<StyleRuleViewport> create(Ref<StyleProperties>&& properties) { return adoptRef(*new StyleRuleViewport(WTFMove(properties))); }
    253253
    254254    ~StyleRuleViewport();
  • trunk/Source/WebCore/css/StyleSheetContents.cpp

    r195141 r195304  
    7272    , m_isInMemoryCache(false)
    7373    , m_parserContext(context)
    74     , m_arena(BumpArena::create())
    7574{
    7675}
     
    9392    , m_isInMemoryCache(false)
    9493    , m_parserContext(o.m_parserContext)
    95     , m_arena(BumpArena::create())
    9694{
    9795    ASSERT(o.isCacheable());
     
    316314
    317315    CSSParser p(parserContext());
    318     p.setArena(m_arena.get());
    319316    p.parseSheet(this, sheetText, TextPosition(), nullptr, true);
    320317
     
    338335{
    339336    CSSParser p(parserContext());
    340     p.setArena(m_arena.get());
    341337    p.parseSheet(this, sheetText, textPosition, nullptr, createdByParser);
    342338    return true;
  • trunk/Source/WebCore/css/StyleSheetContents.h

    r195141 r195304  
    2525#include "CachePolicy.h"
    2626#include "URL.h"
    27 #include <wtf/BumpArena.h>
    2827#include <wtf/HashMap.h>
    2928#include <wtf/ListHashSet.h>
     
    175174
    176175    Vector<CSSStyleSheet*> m_clients;
    177 
    178     Ref<BumpArena> m_arena;
    179176};
    180177
  • trunk/Source/WebCore/dom/SelectorQuery.cpp

    r195293 r195304  
    609609}
    610610
    611 SelectorQueryCache::SelectorQueryCache()
    612     : m_arena(BumpArena::create())
    613 {
    614 }
    615 
    616611SelectorQuery* SelectorQueryCache::add(const String& selectors, Document& document, ExceptionCode& ec)
    617612{
     
    621616
    622617    CSSParser parser(document);
    623     parser.setArena(m_arena.get());
    624618    CSSSelectorList selectorList;
    625619    parser.parseSelector(selectors, selectorList);
  • trunk/Source/WebCore/dom/SelectorQuery.h

    r195141 r195304  
    3030#include "NodeList.h"
    3131#include "SelectorCompiler.h"
    32 #include <wtf/BumpArena.h>
    3332#include <wtf/HashMap.h>
    3433#include <wtf/Vector.h>
     
    134133
    135134public:
    136     SelectorQueryCache();
    137135    SelectorQuery* add(const String&, Document&, ExceptionCode&);
    138136
    139137private:
    140138    HashMap<String, std::unique_ptr<SelectorQuery>> m_entries;
    141     Ref<BumpArena> m_arena;
    142139};
    143140
  • trunk/Source/WebCore/svg/SVGFontFaceElement.cpp

    r195141 r195304  
    5050inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document& document)
    5151    : SVGElement(tagName, document)
    52     , m_fontFaceRule(StyleRuleFontFace::create(nullptr, MutableStyleProperties::create(CSSStrictMode)))
     52    , m_fontFaceRule(StyleRuleFontFace::create(MutableStyleProperties::create(CSSStrictMode)))
    5353    , m_fontElement(nullptr)
    5454{
Note: See TracChangeset for help on using the changeset viewer.