delete on global object not properly guarded

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u20
    • Affects Version/s: 8
    • Component/s: core-libs
    • b09
    • generic
    • generic

        Reported by Walter Higgins on nashorn-dev:

        http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-February/002745.html

        The problem is that the global variable is configurable but callsites using it will not be properly guarded.

        Script to reproduce:

        global = this;

        function test() {
          global.self = 123;
          try {
            print(self);
          } finally {
            delete global.self;
          }
        }

        test();
        test();
        test();

              Assignee:
              Hannes Wallnoefer
              Reporter:
              Hannes Wallnoefer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: