summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/objc/objc_runtime.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/bridge/objc/objc_runtime.h
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/bridge/objc/objc_runtime.h')
-rw-r--r--WebCore/bridge/objc/objc_runtime.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/WebCore/bridge/objc/objc_runtime.h b/WebCore/bridge/objc/objc_runtime.h
index 5f0d8e2..5ed6d2a 100644
--- a/WebCore/bridge/objc/objc_runtime.h
+++ b/WebCore/bridge/objc/objc_runtime.h
@@ -44,11 +44,9 @@ public:
ObjcField(IvarStructPtr);
ObjcField(CFStringRef name);
- virtual JSValue* valueFromInstance(ExecState*, const Instance*) const;
- virtual void setValueToInstance(ExecState*, const Instance*, JSValue*) const;
-
- virtual const char *name() const;
-
+ virtual JSValuePtr valueFromInstance(ExecState*, const Instance*) const;
+ virtual void setValueToInstance(ExecState*, const Instance*, JSValuePtr) const;
+
private:
IvarStructPtr _ivar;
RetainPtr<CFStringRef> _name;
@@ -57,21 +55,21 @@ private:
class ObjcMethod : public Method {
public:
ObjcMethod() : _objcClass(0), _selector(0), _javaScriptName(0) {}
- ObjcMethod(ClassStructPtr aClass, const char *_selector);
-
- virtual const char *name() const;
+ ObjcMethod(ClassStructPtr aClass, SEL _selector);
virtual int numParameters() const;
NSMethodSignature *getMethodSignature() const;
- bool isFallbackMethod() const { return strcmp(_selector, "invokeUndefinedMethodFromWebScript:withArguments:") == 0; }
+ bool isFallbackMethod() const { return _selector == @selector(invokeUndefinedMethodFromWebScript:withArguments:); }
void setJavaScriptName(CFStringRef n) { _javaScriptName = n; }
CFStringRef javaScriptName() const { return _javaScriptName.get(); }
+ SEL selector() const { return _selector; }
+
private:
ClassStructPtr _objcClass;
- const char *_selector;
+ SEL _selector;
RetainPtr<CFStringRef> _javaScriptName;
};
@@ -79,13 +77,13 @@ class ObjcArray : public Array {
public:
ObjcArray(ObjectStructPtr, PassRefPtr<RootObject>);
- virtual void setValueAt(ExecState *exec, unsigned int index, JSValue* aValue) const;
- virtual JSValue* valueAt(ExecState *exec, unsigned int index) const;
+ virtual void setValueAt(ExecState *exec, unsigned int index, JSValuePtr aValue) const;
+ virtual JSValuePtr valueAt(ExecState *exec, unsigned int index) const;
virtual unsigned int getLength() const;
ObjectStructPtr getObjcArray() const { return _array.get(); }
- static JSValue* convertObjcArrayToArray(ExecState *exec, ObjectStructPtr anObject);
+ static JSValuePtr convertObjcArrayToArray(ExecState *exec, ObjectStructPtr anObject);
private:
RetainPtr<ObjectStructPtr> _array;
@@ -104,17 +102,17 @@ public:
return exec->lexicalGlobalObject()->objectPrototype();
}
- static PassRefPtr<StructureID> createStructureID(JSValue* prototype)
+ static PassRefPtr<Structure> createStructure(JSValuePtr prototype)
{
- return StructureID::create(prototype, TypeInfo(ObjectType));
+ return Structure::create(prototype, TypeInfo(ObjectType));
}
private:
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual void put(ExecState*, const Identifier& propertyName, JSValue*, PutPropertySlot&);
+ virtual void put(ExecState*, const Identifier& propertyName, JSValuePtr, PutPropertySlot&);
virtual CallType getCallData(CallData&);
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
- virtual JSValue* defaultValue(ExecState*, PreferredPrimitiveType) const;
+ virtual JSValuePtr defaultValue(ExecState*, PreferredPrimitiveType) const;
virtual bool toBoolean(ExecState*) const;