@@toStringTag spoofing for null and undefined

Gary Guo nbdd0121 at hotmail.com
Sun Feb 8 05:35:26 PST 2015


No one have comments on this?

From: nbdd0121 at hotmail.com
To: ljharb at gmail.com
Subject: Re: @@toStringTag spoofing for null and undefined
Date: Sat, 31 Jan 2015 06:03:17 +0000
CC: es-discuss at mozilla.org








          Are the checks for these internal slots continuing to exist? Or shall we just set the @@toStringTag on their prototype and drop these steps.
For example:If the this value is undefined, return "[object Undefined]".
          If the this value is null, return "[object Null]".
          If O has an [[ParameterMap]] internal
              slot, let builtinTag be "Arguments".          Else, let builtinTag be "Object".
          Let tag be the result of GetV (O, @@toStringTag).
          ReturnIfAbrupt(tag).
          If tag is undefined, let tag be builtinTag.
          Else,
If Type(tag) is not String, let tag be
                  "???".Return the String value that is the result of concatenating the three Strings "[object ", tag,
              and "]".Under the condition that Object.prototype[@@toStringTag], String.prototype[@@toStringTag]], etc are properly set.
        



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150208/4760ea34/attachment-0001.html>


More information about the es-discuss mailing list