Re: weird assertion failure in js::NewContext (JS60)
Steve Fink <[email protected]> Thu, 28 Mar 2019 13:48:52 -0700
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On 3/28/19 1:23 PM, Kent Williams wrote: > 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. I don't think it's different from the usual calculation. We'll stop backporting bugfixes when the new esr comes out, and I suspect porting across 1 esr at a time is easier than porting across 2. But those are independent of the specific esr in question, and will matter more or less for your particular situation. Generally, I think we're a bit faster and less memory-intensive since esr60, and it's easier to integrate with the GC properly. Feature-wise, I would guess you probably wouldn't expect to make use of BigInt, BinAST, or WASM which are all new or dramatically improved. The things most likely to be useful to you are modules and Promises. The things most likely to be annoying are that jsapi.h is gradually being split up into separate headers, and the introduction of Realms. That's my take based on a quick skim of hg history. Hopefully porting will be a little easier with the existence of https://github.com/spidermonkey-embedders/ <https://github.com/spidermonkey-embedders/> than it has been in the past. (I have no quibble with calling it porting; I know how much churn there is, and we make no pretense of interface stability anymore. I feel like the APi churn has slowed down a fair bit, fwiw.) > > 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 _______________________________________________ dev-tech-js-engine mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine