JSON.parse should not use [[Put]] but use [[DefineOwnProperty]] instead

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b93
    • generic
    • generic
    • Verified


      Object.defineProperty(Object.prototype,"",{set:
      function(v){print("called set")}})
      JSON.parse('{}',function(){})
      => should not call the setter (use [[DefineOwnProperty]] instead of [[Put]])

      Object.defineProperty(Object.prototype,"foo",{set:
      function(v){print("called set")}})
      JSON.parse('{"foo": 1}')
      => should not call the setter (use [[DefineOwnProperty]] instead of [[Put]])

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

              Created:
              Updated:
              Resolved: