Ignore:
Timestamp:
Dec 25, 2005, 1:22:35 AM (19 years ago)
Author:
mjs
Message:

Reviewed by Eric and Dave Hyatt.

This is a somewhat cheesy change. Having to use PassRefPtr_Ref creates ambiguities
in assignment and copy construction. And this makes life way easier and removes
the need for pass(). It is not really correct, but we pretty much never need a real
const PassRefPtr, and this takes care of things for PassRefPtr temporaries.

  • kjs/identifier.cpp: (KJS::Identifier::add): No more need for pass()
  • kjs/property_map.cpp: (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): No more need for pass()
  • kjs/ustring.cpp: (KJS::UString::Rep::create): Use adoptRef (KJS::UString::UString): No more need for pass (KJS::UString::append): No more need for pass (KJS::UString::substr): No more need for pass
  • kxmlcore/PassRefPtr.h: made m_ptr mutable (ugh) (KXMLCore::PassRefPtr::PassRefPtr): Take a const PassRefPtr reference (KXMLCore::PassRefPtr::release): Made this a const method (ugh) (KXMLCore::PassRefPtr::operator=): clean up appropriately (KXMLCore::adoptRef): Added this to use instead of PassRefPtr<T>::adopt, I think it makes the behavior more clear and it is less verbose. (KXMLCore::static_pointer_cast): use adoptRef (KXMLCore::const_pointer_cast): use adoptRef
  • kxmlcore/RefPtr.h: (KXMLCore::RefPtr::RefPtr): take const PassRefPtr& (KXMLCore::PassRefPtr::operator=): take const PassRefPtr&
File:
1 edited

Legend:

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

    r11684 r11763  
    615615        UString::Rep *key = _singleEntry.key;
    616616        if (key) {
    617             UString k(pass(key));
     617            UString k(key);
    618618            bool fitsInUInt32;
    619619            k.toUInt32(&fitsInUInt32);
    620620            if (fitsInUInt32)
    621                 list.append(Reference(base, Identifier(pass(key))));
     621                list.append(Reference(base, Identifier(key)));
    622622        }
    623623#endif
     
    630630        UString::Rep *key = entries[i].key;
    631631        if (key && key != &UString::Rep::null) {
    632             UString k(pass(key));
     632            UString k(key);
    633633            bool fitsInUInt32;
    634634            k.toUInt32(&fitsInUInt32);
    635635            if (fitsInUInt32)
    636                 list.append(Reference(base, Identifier(pass(key))));
     636                list.append(Reference(base, Identifier(key)));
    637637        }
    638638    }
Note: See TracChangeset for help on using the changeset viewer.