JavaScriptCore:

2008-09-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej Stachowiak.

        Remove staticFunctionGetter.  There is only one remaining user of
        staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot.

        * JavaScriptCore.exp:
        * kjs/lookup.cpp:
        * kjs/lookup.h:

WebCore:

2008-09-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej Stachowiak.

        Remove staticFunctionGetter.  There is only one remaining user of
        staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::getOwnPropertySlot):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7ae5a30..a5cc675 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2008-09-24  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Remove staticFunctionGetter.  There is only one remaining user of
+        staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot.
+
+        * JavaScriptCore.exp:
+        * kjs/lookup.cpp:
+        * kjs/lookup.h:
+
 2008-09-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index a070d02..704f488 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -164,7 +164,6 @@
 __ZN3JSC19constructEmptyArrayEPNS_9ExecStateE
 __ZN3JSC19initializeThreadingEv
 __ZN3JSC20constructEmptyObjectEPNS_9ExecStateE
-__ZN3JSC20staticFunctionGetterEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE
 __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectEPNS_7JSValueERKNS_7ArgListE
 __ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
 __ZN3JSC4Heap14allocateNumberEm
diff --git a/JavaScriptCore/kjs/lookup.cpp b/JavaScriptCore/kjs/lookup.cpp
index b8a3f4f..c5bf5fc 100644
--- a/JavaScriptCore/kjs/lookup.cpp
+++ b/JavaScriptCore/kjs/lookup.cpp
@@ -54,21 +54,6 @@
     }
 }
 
-JSValue* staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
-{
-    // Look for cached value in dynamic map of properties (in JSObject)
-    ASSERT(slot.slotBase()->isObject());
-    JSObject* thisObj = static_cast<JSObject*>(slot.slotBase());
-    JSValue* cachedVal = thisObj->getDirect(propertyName);
-    if (cachedVal)
-        return cachedVal;
-
-    const HashEntry* entry = slot.staticEntry();
-    JSValue* val = new (exec) PrototypeFunction(exec, entry->length, propertyName, entry->functionValue);
-    thisObj->putDirect(propertyName, val, entry->attributes);
-    return val;
-}
-
 void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot)
 {
     ASSERT(entry->attributes & Function);
diff --git a/JavaScriptCore/kjs/lookup.h b/JavaScriptCore/kjs/lookup.h
index 8a5ef57..bd4af7f 100644
--- a/JavaScriptCore/kjs/lookup.h
+++ b/JavaScriptCore/kjs/lookup.h
@@ -96,12 +96,6 @@
         void createTable(JSGlobalData*) const;
     };
 
-    /**
-     * @internal
-     * Helper for getStaticPropertySlot
-     */
-    JSValue* staticFunctionGetter(ExecState*, const Identifier& propertyName, const PropertySlot&);
-
     void setUpStaticFunctionSlot(ExecState*, const HashEntry*, JSObject* thisObject, const Identifier& propertyName, PropertySlot&);
 
     /**
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 38105d0..62ce62f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2008-09-24  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        Remove staticFunctionGetter.  There is only one remaining user of
+        staticFunctionGetter and it can be converted to use setUpStaticFunctionSlot.
+
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::getOwnPropertySlot):
+
 2008-09-24  Jeremy Moskovich  <jeremy@chromium.org>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/bindings/js/JSDOMWindowBase.cpp b/WebCore/bindings/js/JSDOMWindowBase.cpp
index 4ae4393..4de963d 100644
--- a/WebCore/bindings/js/JSDOMWindowBase.cpp
+++ b/WebCore/bindings/js/JSDOMWindowBase.cpp
@@ -589,7 +589,7 @@
                     return false;
             }
             if (allowsAccessFrom(exec))
-                slot.setStaticEntry(this, entry, staticFunctionGetter);
+                setUpStaticFunctionSlot(exec, entry, this, propertyName, slot);
             else
                 slot.setUndefined();
         } else