Ignore:
Timestamp:
Jul 6, 2008, 7:49:29 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-07-06 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

Second step in broad cleanup effort.

[ File list elided ]

WebCore:

2008-07-06 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

Add #include for kjs/protect.h.

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestAsynchronously):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/PropertyMap.cpp

    r34582 r35027  
    6464static int numRemoves;
    6565
    66 struct PropertyMapStatisticsExitLogger { ~PropertyMapStatisticsExitLogger(); };
     66struct PropertyMapStatisticsExitLogger {
     67    ~PropertyMapStatisticsExitLogger();
     68};
    6769
    6870static PropertyMapStatisticsExitLogger logger;
     
    8688
    8789    PropertyMapEntry(UString::Rep* k, JSValue* v, int a)
    88         : key(k), value(v), attributes(a), index(0)
     90        : key(k)
     91        , value(v)
     92        , attributes(a)
     93        , index(0)
    8994    {
    9095    }
     
    143148        return;
    144149    }
    145    
     150
    146151    unsigned entryCount = m_u.table->keyCount + m_u.table->deletedSentinelCount;
    147152    for (unsigned i = 1; i <= entryCount; i++) {
     
    175180}
    176181
    177 JSValue* PropertyMap::get(const Identifier& name, unsigned& attributes) const
    178 {
    179     ASSERT(!name.isNull());
    180    
    181     UString::Rep* rep = name._ustring.rep();
    182    
     182JSValue* PropertyMap::get(const Identifier& propertyName, unsigned& attributes) const
     183{
     184    ASSERT(!propertyName.isNull());
     185
     186    UString::Rep* rep = propertyName._ustring.rep();
     187
    183188    if (!m_usingTable) {
    184189#if USE_SINGLE_ENTRY
     
    190195        return 0;
    191196    }
    192    
     197
    193198    unsigned i = rep->computedHash();
    194199
     
    230235}
    231236
    232 JSValue* PropertyMap::get(const Identifier& name) const
    233 {
    234     ASSERT(!name.isNull());
    235    
    236     UString::Rep* rep = name._ustring.rep();
    237    
     237JSValue* PropertyMap::get(const Identifier& propertyName) const
     238{
     239    ASSERT(!propertyName.isNull());
     240
     241    UString::Rep* rep = propertyName._ustring.rep();
     242
    238243    if (!m_usingTable) {
    239244#if USE_SINGLE_ENTRY
     
    243248        return 0;
    244249    }
    245    
     250
    246251    unsigned i = rep->computedHash();
    247252
     
    279284}
    280285
    281 JSValue** PropertyMap::getLocation(const Identifier& name)
    282 {
    283     ASSERT(!name.isNull());
    284    
    285     UString::Rep* rep = name._ustring.rep();
    286    
     286JSValue** PropertyMap::getLocation(const Identifier& propertyName)
     287{
     288    ASSERT(!propertyName.isNull());
     289
     290    UString::Rep* rep = propertyName._ustring.rep();
     291
    287292    if (!m_usingTable) {
    288293#if USE_SINGLE_ENTRY
     
    292297        return 0;
    293298    }
    294    
     299
    295300    unsigned i = rep->computedHash();
    296301
     
    328333}
    329334
    330 JSValue** PropertyMap::getLocation(const Identifier& name, bool& isWriteable)
    331 {
    332     ASSERT(!name.isNull());
    333    
    334     UString::Rep* rep = name._ustring.rep();
    335    
     335JSValue** PropertyMap::getLocation(const Identifier& propertyName, bool& isWriteable)
     336{
     337    ASSERT(!propertyName.isNull());
     338
     339    UString::Rep* rep = propertyName._ustring.rep();
     340
    336341    if (!m_usingTable) {
    337342#if USE_SINGLE_ENTRY
     
    343348        return 0;
    344349    }
    345    
     350
    346351    unsigned i = rep->computedHash();
    347352
     
    383388}
    384389
    385 void PropertyMap::put(const Identifier& name, JSValue* value, unsigned attributes, bool checkReadOnly)
    386 {
    387     ASSERT(!name.isNull());
     390void PropertyMap::put(const Identifier& propertyName, JSValue* value, unsigned attributes, bool checkReadOnly)
     391{
     392    ASSERT(!propertyName.isNull());
    388393    ASSERT(value);
    389    
     394
    390395    checkConsistency();
    391396
    392     UString::Rep* rep = name._ustring.rep();
    393    
     397    UString::Rep* rep = propertyName._ustring.rep();
     398
    394399#if USE_SINGLE_ENTRY
    395400    if (!m_usingTable) {
     
    429434
    430435        if (m_u.table->entries()[entryIndex - 1].key == rep) {
    431             if (checkReadOnly && (m_u.table->entries()[entryIndex - 1].attributes & ReadOnly)) 
     436            if (checkReadOnly && (m_u.table->entries()[entryIndex - 1].attributes & ReadOnly))
    432437                return;
    433438            // Put a new value in an existing hash table entry.
     
    467472        // slot that we can use. We know it will be there because we did at least one
    468473        // deletion in the past that left an entry empty.
    469         while (m_u.table->entries()[--entryIndex - 1].key)
    470             ;
    471     }
    472 
     474        while (m_u.table->entries()[--entryIndex - 1].key) { }
     475    }
    473476
    474477    // Create a new hash table entry.
     
    574577
    575578    Table* oldTable = m_u.table;
    576    
     579
    577580    m_u.table = static_cast<Table*>(fastZeroedMalloc(Table::allocationSize(newTableSize)));
    578581    m_u.table->size = newTableSize;
     
    594597}
    595598
    596 void PropertyMap::remove(const Identifier& name)
    597 {
    598     ASSERT(!name.isNull());
    599    
     599void PropertyMap::remove(const Identifier& propertyName)
     600{
     601    ASSERT(!propertyName.isNull());
     602
    600603    checkConsistency();
    601604
    602     UString::Rep* rep = name._ustring.rep();
     605    UString::Rep* rep = propertyName._ustring.rep();
    603606
    604607    if (!m_usingTable) {
Note: See TracChangeset for help on using the changeset viewer.