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

Megemorphic scope access does not throw ReferenceError when property is missing

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b83
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        function check() {
            try { foo; return true } catch (e) { return false }
        }

        // This should alternate b/w false and true for all iterations
        // but after 16 iterations, both prints print "true"
        // => ReferenceError is not thrown in "check" method for "foo"
        // access after "foo" access becomes megamorphic
        for (var x = 0; x < 40; x++) {
            delete this.foo;
            print(check());
            foo = 44;
            print(check());
        }

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: