Re: Issues with linking Mozilla release binaries to an application debug target

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 3/8/11 11:00 AM, Darth Coder wrote:
> The app was originally written to work with the Firefox 2.0 code base
> and it used to work fine. Now the code has to be moved to Mozilla
> 1.9.2.12. The client app is essentially a web browser container (using
> embedded Gecko) into which a special HTML page is loaded and when the
> page is fully loaded (captured via the nsIWebProgressListener), a JS
> Function contained within the page is explicitly called from the
> Native C++ code. The code is written such that it obtains the
> JSContext and JSGlobalObject from the html page's dom (nsIDocument
> object) and then calls the JS_CallFunctionName method with the name of
> the JS function to execute.

But you don't push the relevant JSContext on the xpconnect stack?  That 
would cause your assertion failures for sure.

> I am not sure if this is no longer the right way to achieve this, if
> this is not right, please let me know the proper way to achieve this.

If you're not pushing the right JSContext on the stack, then you were 
never doing it the "right" way.  It's just that now we added asserts for 
the security fail that results....

You probably want to look at what nsJSContext::CallEventHandler does 
before the JS_CallFunctionValue call it makes.

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.