2008-05-28 Geoffrey Garen <ggaren@apple.com>
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 May 2008 02:11:41 +0000 (02:11 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 May 2008 02:11:41 +0000 (02:11 +0000)
        Reviewed by Oliver Hunt.

        Fixed total destruction in Software Update.app.

        Updated JavaScriptGlue to honor squirrelfish's new getCallData mechanism for
        indicating that an object can be called as a function.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34191 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptGlue/ChangeLog
JavaScriptGlue/JSObject.cpp
JavaScriptGlue/JSObject.h
JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
JavaScriptGlue/UserObjectImp.cpp
JavaScriptGlue/UserObjectImp.h

index 9bbaf512c8954baffa20717d24799c66e4ae89db..69b1b541381eb51ca0a9e38710e23867489cf709 100644 (file)
@@ -1,3 +1,12 @@
+2008-05-28  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Oliver Hunt.
+        
+        Fixed total destruction in Software Update.app.
+        
+        Updated JavaScriptGlue to honor squirrelfish's new getCallData mechanism for
+        indicating that an object can be called as a function.
+
 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Oliver.
index 1290cb34e5f4083d9effb1a4914beb00e366c4ec..b657e747bad7414a56b83c46b7ba7343c1a8cc2f 100644 (file)
@@ -71,9 +71,9 @@ void JSUserObject::SetProperty(CFStringRef propertyName, JSUserObject* value)
 
 }
 
-bool JSUserObject::ImplementsCall()
+CallType JSUserObject::getCallData(CallData&)
 {
-    return fCallBacks.callFunction ? true : false;
+    return fCallBacks.callFunction ? CallTypeNative : CallTypeNone;
 }
 
 JSUserObject* JSUserObject::CallFunction(JSUserObject* thisObj, CFArrayRef args)
index f0be22eb47609794aba86d05f7b71bc04201a909..ba13f6fdbba754033fb7120114587f70463f2c2a 100644 (file)
@@ -43,7 +43,7 @@ class JSUserObject : public JSBase {
         CFArrayRef CopyPropertyNames(void);
         JSUserObject* CopyProperty(CFStringRef propertyName);
         void SetProperty(CFStringRef propertyName, JSUserObject* value);
-        bool ImplementsCall();
+        CallType getCallData(CallData&);
         JSUserObject* CallFunction(JSUserObject* thisObj, CFArrayRef args);
         CFTypeRef CopyCFValue() const;
         virtual UInt8 Equal(JSBase* other);
index cc18dc74d4d2112982a5b7765bc72e83efb0d472..e0bf5d623808db18f4acb5c4cce2f6db938ea1de 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 14AC662B08CE7791006915A8 /* Build configuration list for PBXProject "JavaScriptGlue" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptGlue */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
index 7217c40e5bd7a96a18b7441967a22678fdb6e4f1..27e9be0041e1829779161f0a730b66caa1a05592 100644 (file)
@@ -48,9 +48,9 @@ const ClassInfo * UserObjectImp::classInfo() const
     return &info;
 }
 
-bool UserObjectImp::implementsCall() const
+CallType UserObjectImp::getCallData(CallData& callData)
 {
-    return fJSUserObject ? fJSUserObject->ImplementsCall() : false;
+    return fJSUserObject ? fJSUserObject->getCallData(callData) : CallTypeNone;
 }
 
 JSValue *UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
@@ -74,7 +74,7 @@ JSValue *UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const
         { // scope
             JSLock::DropAllLocks dropLocks;
 
-            // implementsCall should have guarded against a NULL fJSUserObject.
+            // getCallData should have guarded against a NULL fJSUserObject.
             assert(fJSUserObject);
             jsResult = fJSUserObject->CallFunction(jsThisObj, jsArgs);
         }
index 54e5ab637ed4d3f3f9a70d9a168e24a7464ba7a5..ce08bd2de9d6ba283af78b24766515c1acb08e20 100644 (file)
@@ -42,7 +42,7 @@ public:
     virtual const ClassInfo *classInfo() const;
     static const ClassInfo info;
 
-    virtual bool implementsCall() const;
+    virtual CallType getCallData(CallData&);
 
     virtual void getPropertyNames(ExecState*, PropertyNameArray&);