Final reply to my own problem, just for everyone that has the same
problem.
I now call my function to setup the object from the implementation of
nsIWebProgressListener::OnLocationChange() and that seems to work.

Olaf wrote:
> Olaf wrote:
> > Just found something really weird. According to the documentation,
> > JS_DefineObject should return NULL if it can't create the new object.
> > But I'm able to call it twice in a row (with the same parameters)
> > without any problem. I get two different pointers.
>
> I keep replying to my own messages... I traced the second call, and it
> determines that I try to Define the same object again, and overwrites
> the first one. Still leaves me with the problem why it won't work. My
> C++ constructor or defined constructor function are never called, while
> in my script I check for the defined object and create a new instance
> just to test.

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to