Standardizing out-of-memory and stack-depth-exceeded errors?

Mike Shaver mike.shaver at gmail.com
Wed Mar 23 20:22:41 PDT 2011


On Wed, Mar 23, 2011 at 8:21 PM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
> Bad quoting made it confusing, but I was (am) right. Edited as intended below:
> On 3/23/11, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
>> On 3/23/11, Mike Shaver <mike.shaver at gmail.com> wrote:
>>> On Wed, Mar 23, 2011 at 6:21 PM, Garrett Smith <dhtmlkitchen at gmail.com>
>>> wrote:
>>>> javascript: alert(new InternalError("Got on tha inside, bitch!"));
>>>>
>>>> Hrm. seems odd to expose the constructor publicly.
>>>
>>> Necessary to permit instanceof testing, no?
> [...]
>>>
>> No; instanceof uses [[HasInstance]] which compares the Function's
>> prototype property to the each objet in the object's prototype chain.
>> If there is a match, the result is true. Otherwise, the result is
>> false.

I mean that you need the constructor exposed to test instanceof for
InternalError.

Mike


More information about the es-discuss mailing list