Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005848

assigning to global toString variable affects Object.prototype.toString

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None
    • b82
    • generic
    • generic
    • Verified

    Description

      {code}
      toString = function() {
        print("global's toString called!!");
      }

      var obj = {};
      var str = obj.toString();
      if (str != "[object Object]") {
          print("FAILED: toString does not return expected value");
      }
      {code}

      prints

      global's toString called!!
      FAILED: toString does not return expected value

      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: