Changeset 38268 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 10, 2008, 12:25:35 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-10 Cameron Zwarich <[email protected]>

Reviewed by Geoff Garen.

Bug 22162: Remove cachedValueGetter from the JavaScriptCore API implementation
<https://bugs.webkit.org/show_bug.cgi?id=22162>

There is no more need for the cachedValueGetter hack now that we have
PropertySlot::setValue(), so we should remove it.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (JSC::::getOwnPropertySlot):
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

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

    r38066 r38268  
    8383    static JSObject* construct(ExecState*, JSObject* constructor, const ArgList&);
    8484   
    85     static JSValue* cachedValueGetter(ExecState*, const Identifier&, const PropertySlot&);
    8685    static JSValue* staticValueGetter(ExecState*, const Identifier&, const PropertySlot&);
    8786    static JSValue* staticFunctionGetter(ExecState*, const Identifier&, const PropertySlot&);
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r38265 r38268  
    128128            JSLock::DropAllLocks dropAllLocks(exec);
    129129            if (JSValueRef value = getProperty(ctx, thisRef, propertyNameRef.get(), toRef(exec->exceptionSlot()))) {
    130                 // cache the value so we don't have to compute it again
    131                 // FIXME: This violates the PropertySlot design a little bit.
    132                 // We should either use this optimization everywhere, or nowhere.
    133                 slot.setCustom(toJS(value), cachedValueGetter);
     130                slot.setValue(toJS(value));
    134131                return true;
    135132            }
     
    431428
    432429template <class Base>
    433 JSValue* JSCallbackObject<Base>::cachedValueGetter(ExecState*, const Identifier&, const PropertySlot& slot)
    434 {
    435     JSValue* v = slot.slotBase();
    436     ASSERT(v);
    437     return v;
    438 }
    439 
    440 template <class Base>
    441430JSValue* JSCallbackObject<Base>::staticValueGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
    442431{
  • trunk/JavaScriptCore/ChangeLog

    r38265 r38268  
     12008-11-10  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Geoff Garen.
     4
     5        Bug 22162: Remove cachedValueGetter from the JavaScriptCore API implementation
     6        <https://bugs.webkit.org/show_bug.cgi?id=22162>
     7
     8        There is no more need for the cachedValueGetter hack now that we have
     9        PropertySlot::setValue(), so we should remove it.
     10
     11        * API/JSCallbackObject.h:
     12        * API/JSCallbackObjectFunctions.h:
     13        (JSC::::getOwnPropertySlot):
     14
    1152008-11-10  Cameron Zwarich  <[email protected]>
    216
Note: See TracChangeset for help on using the changeset viewer.