From:  Jan de Mooij <jdemooij@mozilla.com>
Date:  17 Jun 2016 17:45:39 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

JSContext refactoring

NNTP-Posting-Host:  63.245.214.181

Hi all,

After hundreds of Gecko/SpiderMonkey patches (thanks to bholley, bz, and
many others), each JSRuntime in Gecko now has a single JSContext.

We've discussed this a bit the past weeks and the next step will likely be
to make JSContext inherit from JSRuntime [0]. JSContext will then only be
used on the main thread, while background threads can still use (shared)
stuff in JSRuntime via ExclusiveContext, similar to how it works today.
(These names are not set in stone, but for now it's easiest to keep them.)

After that, we can hopefully remove JSRuntime from the public API and
embedders will only have to worry about JSContext.

We can do most of these steps incrementally, but that means there will be
breaking API changes for a while as we remove APIs, add new ones (some of
which will be temporary), etc. Jason and I were talking about that this
week and we still think it will be worth it though.

As this will affect all embedders, a heads up seemed appropriate. Let us
know if you have any ideas or suggestions.

Thanks,
Jan

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=650361