[webkit-help] Prototype and object creation

Subramanian RS symsrs at ovi.com
Sun Aug 8 01:44:50 PDT 2010


Hi,

I am using the JSAPIs provided as part of the Javascript core. So far I am successfully created the objects and getting the callbacks etc... But I am not getting the callback if the object creation is under a jQuery extend with a prototype.

jQuery.extend(someobject.prototype, {
    init: function(){
      
     var obj = new MyObject(...);  /// whenever this line is executed I am not getting the constructor callback

In the normal way the MyObject can be created but not when extending.

I am using JSObjectMake to create the JSObjectRef and I tried to use the JSObjectSetPrototype. I am implementing JSObjectCallAsConstructorCallback callback. But nothing seems to be working and I am not getting hit on this callback.

I debugged the webkit code and I am getting a plain JSObject that is created in the interpreter 

ConstructType constructType = v.getConstructData(constructData);

constructType always returns ConstructTypeJS. I believe I should get the ConstructTypeHost as the construct type.

Could someone point me what I could be doing wrong and any steps I missed?

Thanks in advance,
Rs

--------------------------------------------------------------
Ovi Mail: Making email access easy
http://mail.ovi.com



More information about the webkit-help mailing list