On Oct 27, 2010, at 9:42 PM, mohit kingra wrote:

Hi Oliver...


How we are using C API set provided by JavaScriptCore framework is described below:-


example- Initialization of Window Object in Window.cpp

static JSClassDefinition classDefinition = {
      0,                        /* current (and only) version is 0 */
      kJSClassAttributeNone,    /*JSClassAttributes*/

      "Window",
      0,                           /*JSClassRef*/
      WindowProps,                /*const JSStaticValue*                staticValues;  */
      WindowMethods,             /*const JSStaticFunction*             staticFunctions;*/
      NULL,                        /*JSObjectInitializeCallback          initialize*/
      Window_Finalize,        /*JSObjectFinalizeCallback*/
      Window_HasProperty,/*JSObjectHasPropertyCallback */
      Window_GetProperty, /*JSObjectGetPropertyCallback*/
      Window_SetProperty, //NULL, /*JSObjectSetPropertyCallback */
      NULL, /*JSObjectDeletePropertyCallback*/
      NULL, /*JSObjectGetPropertyNamesCallback*/
      NULL, /* JSObjectCallAsFunctionCallback*/
      NULL, /* JSObjectCallAsConstructorCallback*/
      NULL, /* JSObjectHasInstanceCallback*/
      NULL /*JSObjectConvertToTypeCallback*/
};

InitWindowClass()
{
.............
       GlobalObjectClass = JSClassCreate(&classDefinition);
        pJsCx = JSGlobalContextCreate( GlobalObjectClass);

        pWinObj =  JSContextGetGlobalObject(pJsCx);

register pWinObj with a DOM's structure holding all the objects made like above 
.........
.........
}

See,The standard properties/Methods are accesible if defined in WindowProp/WindowMethods as Window Object is made Right.
The problem is in accesing JavaScript Objects using parent keyword.

What do you mean by "parent"?

Are any of the properties you're trying to access being provided by the Window_GetProperty callback?  If so is Window_GetProperty consistent with Window_HasProperty?

--Oliver


Mohit



On Thu, Oct 28, 2010 at 9:48 AM, Oliver Hunt <oliver@apple.com> wrote:

On Oct 27, 2010, at 9:14 PM, mohit kingra wrote:

No, we haven't registered any custom properties for Browser Objects.

On Thu, Oct 28, 2010 at 9:40 AM, Oliver Hunt <oliver@apple.com> wrote:

On Oct 27, 2010, at 9:02 PM, mohit kingra wrote:

> Hi All,
>
> First thing first, The BrowserCore is not WebCore of Webkit, its our own. We are only using JavaScriptCore Library from WebKit.
>
> The Platform we are working on is Gtk on Linux.
>
> Methods/Properties of Browser Objects or Custom Objects are registered as Callbacks using JSClassDefinition structure(JavaScriptCore APIs) in our Interface Code for SquirrelFish and BrowserCore.

Do your custom properties exist on any of the browser objects?

I meant to ask are you aware of your custom properties every being present?

What do you mean by your interface code to squirrelfish?  JavaScriptCore is the API you should be using -- squirrelfish is just the execution engine so if you're circumventing the APIs you may encounter all sorts of problems.

It may be helpful if you give some sample code to show us how you're using the api, as that will make it easier for us to understand what's happening and why your properties aren't showing up.

--Oliver