[webkit-dev] JavaScriptCore constructor callback and class questions

2008-01-08 Thread Dan Waylonis

Hi,

I'm using JavaScriptCore and have created a custom class to be used  
within the global context.  I've defined a constructor callback with  
the signature of JSObjectCallAsConstructorCallback:


JSObjectRef PointConstructor(JSContextRef ctx, JSObjectRef  
constructor, size_t argumentCount, const JSValueRef arguments[],  
JSValueRef* exception);


and set the returned object as the value of the Point property on  
the global object.  When the interpreter encounters the line var p =  
new Point(); it calls things correctly and I'm able to create my  
Point object and it works properly in the scripting environment.


I'm interested in generalizing my code so that I could have a single  
constructor callback function for multiple objects, and based on the  
value of the constructor argument, create the correct object.


Can any information (e.g., name or JSClassRef) about the class being  
constructed be extracted from the constructor argument?  I don't get  
any enumerable properties from it.  I did noticed that the memory  
address of the constructor argument is identical to the one that I  
got when I called JSObjectMakeConstructor() and set it as a property  
on the global object.


Also, there doesn't seem to be a way to look up the name (or any other  
information) on a JSClassRef object.  It would be nice to have a  
function to get back a copy of the JSClassDefinition used to create  
the class.


Thanks,
Dan
-
Dan Waylonis[EMAIL PROTECTED]
nekotech SOFTWARE
http://www.nekotech.com
650.964.2490 Voice / Fax



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Cancel non-terminating JavaScriptCore JSEvaluate()?

2007-12-28 Thread Dan Waylonis

Hi,

If I send some non-terminating code (e.g., while(1);) to JSEvaluate(),  
is there a way to have a watchdog thread/timer notice that  
JSEvaluate() is not terminating (after some amount of time) and cancel  
the code evaluation?


I seem to remember reading that Safari3 has something like this.

Thanks,
Dan
-
Dan Waylonis[EMAIL PROTECTED]
nekotech SOFTWARE
http://www.nekotech.com
650.964.2490 Voice / Fax



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Leopard WebKit bundle version

2007-11-13 Thread Dan Waylonis

Hi,

On Leopard, /System/Library/Frameworks/WebKit.framework/Versions/A/ 
Resources/Info.plist (excerpt):


   keyCFBundleShortVersionString/key
string5523.10.3/string
keyCFBundleVersion/key
string5523.10.3/string

However, http://developer.apple.com/internet/safari/uamatrix.html  
says that it should be 523.10.3


Who's right?  I've voting for a sticky 5 key on someone's  
keyboard... :-)


Dan
-
Dan Waylonis[EMAIL PROTECTED]
nekotech SOFTWARE
http://www.nekotech.com
650.964.2490 Voice / Fax



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev