Re: weird assertion failure in js::NewContext (JS60)
Kent Williams <[email protected]> Thu, 28 Mar 2019 15:23:08 -0500
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
1. The init before opening the request is fine. 2. JS::DestroyContext with active request is a dumb idea. "Requests are gone in Trunk" Is there any point at trying to port to ESR > 60? And 'port' is the proper word in my opinion. The SpiderMonkey API is a moving target. On 3/28/19 3:18 PM, Steve Fink wrote: > On 3/28/19 12:34 PM, Kent Williams wrote: >> I found out what my problem was. >> >> My interpreter global is this: >> >> JS::PersistentRooted<JSObject *> global; >> >> So since it's a JS::PersistentRootedObject, it needs this before it's >> assigned a value: >> >> global.init(context); > > Makes sense. I have seen other issues with the ordering of > JSContext/JSRuntime shutdown that showed up with PersistentRooted. > Unfortunately, I don't think I backported my fixes to esr60. It > doesn't look like it would have affected your case, though, since > you're looking at startup, not shutdown. > >> This will cause a problem if there is an active JSAutoRequest. The >> init has to happen before entering the request. > > Requests are gone on trunk. But I'm not completely clear -- are you > still having an issue, or does it work to init before any requests? > >> I found another request-related issue -- if you're building for >> Debugging, Spidermonkey throws an error if you call >> JS::DestroyContext with a request still outstanding. > > Is that an issue, or a "don't do that" type of thing? > > > _______________________________________________ > dev-tech-js-engine mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-js-engine _______________________________________________ dev-tech-js-engine mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine