Ignore:
Timestamp:
May 27, 2011, 4:53:36 PM (14 years ago)
Author:
[email protected]
Message:

2011-05-27 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.

Property caching is too aggressive for API objects
https://bugs.webkit.org/show_bug.cgi?id=61677

  • API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our callback APIs allow the client to change its mind about our propertis at any time.
  • API/tests/testapi.c: (PropertyCatchalls_getProperty): (PropertyCatchalls_setProperty): (PropertyCatchalls_getPropertyNames): (PropertyCatchalls_class): (main):
  • API/tests/testapi.js: Some tests for dynamic API objects.
  • interpreter/Interpreter.cpp: (JSC::Interpreter::tryCachePutByID): (JSC::Interpreter::tryCacheGetByID):
  • jit/JITStubs.cpp: (JSC::JITThunks::tryCachePutByID): (JSC::JITThunks::tryCacheGetByID): (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client requires it.
  • runtime/JSTypeInfo.h: (JSC::TypeInfo::TypeInfo): (JSC::TypeInfo::isFinal): (JSC::TypeInfo::prohibitsPropertyCaching): (JSC::TypeInfo::flags): Added a flag to track opting out of property caching. Fixed an "&&" vs "&" typo that was previously harmless, but is now harmful since m_flags2 can have more than one bit set.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.h

    r87536 r87586  
    150150
    151151protected:
    152     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Base::StructureFlags;
     152    static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Base::StructureFlags;
    153153
    154154private:
Note: See TracChangeset for help on using the changeset viewer.