From:  Jan de Mooij <jdemooij@mozilla.com>
Date:  05 Jun 2018 15:26:58 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Re: Same-compartment realms

NNTP-Posting-Host:  63.245.214.181

On Tue, Jun 5, 2018 at 7:50 AM, Paul Bone  wrote:

> Could you explain (or point me to an explaination) of what Realms are for?
> I've gathered that they're a TC39 thing that's being added, maybe for
> security? but since they don't restrict references between realms the way
> compartments and CCWs do, maybe I'm mistaken?  Why add them?
>
> I expect the answer is in one of the references or almost-common knowledge,
> but I seem to have missed it, sorry.
>

Realms are a TC39 thing, but they're not new - a "realm" is just a global
object and things associated with it (for instance, each global object has
its own copy of Object.prototype and other builtin functions and
prototypes). See https://tc39.github.io/ecma262/#sec-code-realms

So if you have a website with 10