From:  Tom Schuster <tom@schuster.me>
Date:  28 Jan 2017 06:43:56 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Please use ClassSpec for new bultin-object objects

NNTP-Posting-Host:  63.245.214.181

Hey JS team!

Please try to use ClassSpec when adding a new built-in object. This
means you don't have to manually define all your properties and
methods and instead let the ClassSpec mechanism take care of this. It
will also link the prototype and stuff like that, so overall a much
nicer system.

The real reason why using ClassSpec is useful is that JSXrays
automatically make those objects work across compartments, which is
suddenly really important for WebExtensions. Because if we don't have
a ClassSpec for some object we will just fail to execute certain
content scripts that work in Chrome etc.

Best,
Tom