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

SwitchPoint invalidation not working over prototype chain

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b91
    • Verified

    Description

      The following script:

          Object.prototype.a = 1;
          var x = {};
          var y = Object.create(x);

          function p() {
              print("y.a: " + y.a);
          }

          p();
          // Delete, then redefine property
          delete Object.prototype.a;
          Object.prototype.a = 10;
          p();

      should print:

      y.a: 1
      y.a: 10

      but currently prints:

      y.a: 1
      y.a: undefined

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: