David Bruant (2014-01-21T09:25:20.000Z)
domenic at domenicdenicola.com (2014-01-24T20:02:32.894Z)
Le 20/01/2014 23:16, Kevin Reid a écrit : > SES needs to visit every 'primordial' / 'singleton' object to ensure > they're made immutable and harmless. (Other 'meta' code might also > benefit though I don't know of any examples offhand.) > > This job is easier if all such objects are reachable via traversing > data properties. > > ES5 contains only one object which this is not true of: Beware, I've heard that the browser contains many more of these objects. See discussion starting at https://bugzilla.mozilla.org/show_bug.cgi?id=900034#c4 In a nutshell, WebIDL defines the "NoInterfaceObject" which, when reified in ECMAScript means that a prototype object exists, but it can't be found via <Interface>.prototype (since <Interface> is not defined as a global). I imagine the only way to find these is create an instance and the Object.getPrototypeOf. It's apparently used in WebGL sometimes. I imagine there is a complete repository of WebIDL files somewhere (Moz/Blink codebase, maybe W3C, maybe alongside the WebGL spec) you can use to list all of these interfaces. How to create the different instances is another story.