1. Jan 22, 2015
  2. Jan 21, 2015
  3. Jan 20, 2015
  4. Jan 19, 2015
  5. Jan 18, 2015
    • Ben Noordhuis's avatar
      benchmark: stop v8 benchmark clobbering RegExp · 50177fb1
      Ben Noordhuis authored
      deps/v8/benchmarks/regexp.js clobbers the RegExp global, breaking
      util.format() and console.log().  Unclobber it to keep the other
      benchmarks working.
      
      Fixes the following error when running benchmark/misc/v8-bench.js:
      
          $ out/Release/iojs benchmark/misc/v8-bench.js
          util.js:84
              if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
                  ^
          TypeError: object is not a function
              at Object.exports.debuglog (util.js:84:9)
              at timers.js:12:29
              at NativeModule.compile (node.js:800:5)
              at NativeModule.require (node.js:769:18)
              at net.js:5:14
              at NativeModule.compile (node.js:800:5)
              at NativeModule.require (node.js:769:18)
              at tty.js:4:11
              at NativeModule.compile (node.js:800:5)
              at Function.NativeModule.require (node.js:769:18)
      
      This could alternatively be addressed by caching the RegExp global
      in lib/util.js.  That's not a bad approach and I considered it but
      doing it for just RegExp and not other globals would be half-baked.
      
      Maybe the more thorough approach where we cache all globals at
      start-up is something for a follow-up pull request.
      
      Fixes: https://github.com/iojs/io.js/pull/475
      PR-URL: https://github.com/iojs/io.js/pull/489
      
      
      Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
      Reviewed-By: default avatarYosuke Furukawa <yosuke.furukawa@gmail.com>
      50177fb1