Re: getCssRules() on nsIDOMCSSStyleSheet fail
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <da0ece49-e759-4bbe-9ffd-1a0c0f02e1fb@r15g2000prh.googlegroups.com> |
On Feb 19, 10:53 am, Boris Zbarsky <[email protected]> wrote: > [email protected] wrote: > >> You could try pushing an appropriate JSContext on the stack... > > > You mentioned this last time as well but I didn't dive into it. How do > > I construct a JSContext from Java XPCOM? > > You don't. And if you have to operate with only scriptable methods, you > lose.... the current setup assumes that scriptable == javascript, and > that if you're not JS then you're capable of calling native C++ code to > do what you need to set up your security context correctly. > > -Boris Currently I totally rely on Java XPCOM calls, which might explain why I wasn't able to make a dent in any of the areas that's security related (other than a few preferences that I can set in security.js). I actually got "FinalizeParams failed (0x80004005)" when I tried to get the nsIJSContextStack service from Java XPCOM before reading your response so I subspected Java XPCOM will lead me nowhere for this issue. So it sounds like I have only two options. One is to move my CSS manipulating function to JavaScript and make it a service to be called from Java XPCOM. The second option is to code a security set up (where I push a context) in C++ and make it a XPCOM object for used in my code. Is this correct? Thanks. I just have another thought. If I disabled JavaScript and revert the subject principal code back then I should be fine with the random failure problem? I am not sure which code this random failure originate from. I am running with UniversalBrowserWrite privilege. Regards, Feng