Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8011086 Specification fails (outside test262)
  3. JDK-8011543

"".split(undefined,{valueOf:function(){throw 2}}) does not throw exception

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • P4
    • Resolution: Fixed
    • None
    • 8
    • core-libs
    • None
    • b86
    • generic
    • generic
    • Verified

    Description

      This script does not throw exception:

      "".split(undefined,{valueOf:function(){throw 2}})

      ECMA 15.5.4.14 String.prototype.split (separator, limit)

      String.prototype.split steps are as follows:

      1. Call CheckObjectCoercible passing the this value as its argument.

      2. Let S be the result of calling ToString, giving it the this value as its argument.

      3. Let A be a new array created as if by the expression new Array()where Array is the standard built-in constructor with that name.

      4. Let lengthA be 0.

      5. If limit is undefined, let lim = 232–1; else let lim = ToUint32(limit).

      [.....]

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: