Ignore:
Timestamp:
Sep 11, 2009, 9:52:39 PM (16 years ago)
Author:
[email protected]
Message:

getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
https://bugs.webkit.org/show_bug.cgi?id=29214

Reviewed by Sam Weinig.

Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
This flag is used to make sure that caching of the property name data is safe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/NumberObject.h

    r47522 r48331  
    3434        static PassRefPtr<Structure> createStructure(JSValue prototype)
    3535        {
    36             return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
     36            return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot | HasDefaultGetPropertyNames));
    3737        }
    3838#else
    3939        static PassRefPtr<Structure> createStructure(JSValue prototype)
    4040        {
    41             return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot | HasDefaultMark));
     41            return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot | HasDefaultMark | HasDefaultGetPropertyNames));
    4242        }
    4343#endif
Note: See TracChangeset for help on using the changeset viewer.