B.3.1 The __proto__ pseudo property

Jeff Walden jwalden+es at MIT.EDU
Tue Apr 23 17:34:44 PDT 2013


On 04/21/2013 03:27 PM, Mark S. Miller wrote:
> Warning: The following is a sickening idea. I would really hate to see us do it. But I feel obliged to post it as it may in fact be the right thing to do.
> 
> This suggests that, in JS as well, the "__proto__" in {...., "__proto__": ...., ....} not be treated as a special case. Quoting it turns off the special treatment.

For the lulz, what do these print in engines?

  print(eval('[{"__proto__":  17}]')[0].hasOwnProperty("__proto__"));
  print(eval('[{"__proto__":0x17}]')[0].hasOwnProperty("__proto__"));

And considering what motivated real-world engine behaviors here, what constraints might possibly SunSpider imply?  (Conceivably none, to be sure, although I have my doubts a strstr could be eaten here.  Or maybe just another mode for the parser.  Ha, ha, ha.  Lulz, I told you, lulz!)

Jeff


More information about the es-discuss mailing list