Module isolation

David-Sarah Hopwood david-sarah at
Mon Jan 11 19:49:22 PST 2010

Brendan Eich wrote:
> On Jan 11, 2010, at 10:53 AM, David-Sarah Hopwood wrote:
>>> Who said primordial objects are shared between modules?
>> Having separate copies of primordial objects for each module is not
>> sufficient to ensure isolation. If one module has access to some object
>> obj of another, it can also get access to that object's prototype chain
>> using Object.getPrototypeOf(obj), or obj.constructor.prototype.
> I meant what I wrote: [w]ho said primordial objects are shared between
> modules? Shared by passing objects, or by fiat in the implementation,
> does not matter.

If objects cannot be passed directly between modules without breaking
encapsulation, then it's not a particularly useful module system.
Passing only JSON objects, say, is not sufficient: it's necessary to be
able to pass function objects, at least.

> Isolation does not require frozen primordials, no
> matter how often you assume it does to conclude that it does.

What part of "I was incorrect in saying that mutable primordials
*necessarily* preclude isolation." did you not understand?

David-Sarah Hopwood  ⚥

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the es-discuss mailing list