Ignore:
Timestamp:
Aug 20, 2013, 10:09:03 AM (12 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=120054
Remove some dead code following getOwnPropertyDescriptor cleanup

Reviewed by Oliver Hunt.

../JavaScriptCore:

  • runtime/Lookup.h:

(JSC::getStaticFunctionSlot):

  • remove getStaticPropertyDescriptor, getStaticFunctionDescriptor, getStaticValueDescriptor.

../WebCore:

  • bindings/js/JSPluginElementFunctions.cpp:
  • bindings/js/JSPluginElementFunctions.h:
    • remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r154253 r154336  
    256256    }
    257257
    258     template <class ThisImp, class ParentImp>
    259     inline bool getStaticPropertyDescriptor(ExecState* exec, const HashTable* table, ThisImp* thisObj, PropertyName propertyName, PropertyDescriptor& descriptor)
    260     {
    261         const HashEntry* entry = table->entry(exec, propertyName);
    262        
    263         if (!entry) // not found, forward to parent
    264             return ParentImp::getOwnPropertyDescriptor(thisObj, exec, propertyName, descriptor);
    265  
    266         PropertySlot slot(thisObj);
    267         if (entry->attributes() & Function) {
    268             bool present = setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
    269             if (present)
    270                 descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
    271             return present;
    272         }
    273 
    274         slot.setCustom(thisObj, entry->attributes(), entry->propertyGetter());
    275         descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
    276         return true;
    277     }
    278 
    279258    /**
    280259     * Simplified version of getStaticPropertySlot in case there are only functions.
     
    294273        return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
    295274    }
    296    
    297     /**
    298      * Simplified version of getStaticPropertyDescriptor in case there are only functions.
    299      * Using this instead of getStaticPropertyDescriptor allows 'this' to avoid implementing
    300      * a dummy getValueProperty.
    301      */
    302     template <class ParentImp>
    303     inline bool getStaticFunctionDescriptor(ExecState* exec, const HashTable* table, JSObject* thisObj, PropertyName propertyName, PropertyDescriptor& descriptor)
    304     {
    305         if (ParentImp::getOwnPropertyDescriptor(static_cast<ParentImp*>(thisObj), exec, propertyName, descriptor))
    306             return true;
    307        
    308         const HashEntry* entry = table->entry(exec, propertyName);
    309         if (!entry)
    310             return false;
    311        
    312         PropertySlot slot(thisObj);
    313         bool present = setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
    314         if (present)
    315             descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
    316         return present;
    317     }
    318275
    319276    /**
     
    332289
    333290        slot.setCacheableCustom(thisObj, entry->attributes(), entry->propertyGetter());
    334         return true;
    335     }
    336 
    337     /**
    338      * Simplified version of getStaticPropertyDescriptor in case there are no functions, only "values".
    339      * Using this instead of getStaticPropertyDescriptor removes the need for a FuncImp class.
    340      */
    341     template <class ThisImp, class ParentImp>
    342     inline bool getStaticValueDescriptor(ExecState* exec, const HashTable* table, ThisImp* thisObj, PropertyName propertyName, PropertyDescriptor& descriptor)
    343     {
    344         const HashEntry* entry = table->entry(exec, propertyName);
    345        
    346         if (!entry) // not found, forward to parent
    347             return ParentImp::getOwnPropertyDescriptor(thisObj, exec, propertyName, descriptor);
    348        
    349         ASSERT(!(entry->attributes() & Function));
    350         PropertySlot slot(thisObj);
    351         slot.setCustom(thisObj, entry->attributes(), entry->propertyGetter());
    352         descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
    353291        return true;
    354292    }
Note: See TracChangeset for help on using the changeset viewer.