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):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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{
Note: See TracChangeset for help on using the changeset viewer.