]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - API/JSCallbackFunction.h
JavaScriptCore-1218.35.tar.gz
[apple/javascriptcore.git] / API / JSCallbackFunction.h
index 885ef949db41c1094201f28bc93b3af130bce15d..ea1d1abb48094470178198ff89e1e6c10a25e83a 100644 (file)
 namespace JSC {
 
 class JSCallbackFunction : public InternalFunction {
-protected:
-    JSCallbackFunction(JSGlobalObject*, Structure*, JSObjectCallAsFunctionCallback);
-    void finishCreation(VM&, const String& name);
-
+    friend struct APICallbackFunction;
 public:
     typedef InternalFunction Base;
 
@@ -50,11 +47,13 @@ public:
         return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); 
     }
 
-protected:
+private:
+    JSCallbackFunction(JSGlobalObject*, Structure*, JSObjectCallAsFunctionCallback);
+    void finishCreation(VM&, const String& name);
+
     static CallType getCallData(JSCell*, CallData&);
 
-private:
-    static EncodedJSValue JSC_HOST_CALL call(ExecState*);
+    JSObjectCallAsFunctionCallback functionCallback() { return m_callback; }
 
     JSObjectCallAsFunctionCallback m_callback;
 };