tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

parse-with-source-proto.js (373B)


      1 // |reftest| skip-if(!JSON.hasOwnProperty('isRawJSON')||!xulRuntime.shell)
      2 
      3 // Changing Object.prototype should not change the behavior of JSON parsing.
      4 Object.defineProperty(Object.prototype, 1, {
      5    set(val) {
      6        this[0] = {}
      7    },
      8 })
      9 assertDeepEq(["a", "b"], JSON.parse('["a","b"]', (k,v,c) => v))
     10 
     11 if (typeof reportCompare == 'function')
     12    reportCompare(0, 0);