Ignore:
Timestamp:
Mar 21, 2008, 7:36:34 PM (17 years ago)
Author:
[email protected]
Message:

Global properties that use LocalStorage are not correctly listed as enumerable.

Reviewed by Geoff Garen

The problem was caused by JSObject::getPropertyAttributes not being aware
of the JSVariableObject SymbolTable. The fix is to make getPropertyAttributes
virtual and override in JSVariableObject. This does not produce any performance
regression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSVariableObject.h

    r31114 r31225  
    3838    class JSVariableObject : public JSObject {
    3939    public:
    40         SymbolTable& symbolTable() { return *d->symbolTable; }
    41         LocalStorage& localStorage() { return d->localStorage; }
     40        SymbolTable& symbolTable() const { return *d->symbolTable; }
     41        LocalStorage& localStorage() const { return d->localStorage; }
    4242       
    4343        void saveLocalStorage(SavedProperties&) const;
     
    5353        virtual bool isVariableObject() const;
    5454        virtual bool isDynamicScope() const = 0;
     55
     56        virtual bool getPropertyAttributes(const Identifier& propertyName, unsigned& attributes) const;
    5557
    5658    protected:
Note: See TracChangeset for help on using the changeset viewer.