h5bp/html5-boilerplate — pull request #1029 by philipwalton (2012-03-23 06:37:07+00:00)
Title: added a try/catch block to make log work with 'use strict'

I've added a try/catch block to make the `log()` function play nice in strict mode.

The offending line (as noted in several issues filed) is `args.callee = args.callee.caller`. This line is useful in non-strict mode but serves no value in strict mode as `callee` and `caller` are not allowed, so setting the appropriate caller function on the arguments object is pointless. Thus, it made sense to me to put that line in a try/catch block to prevent it from throwing an error in strict mode yet still allowing it for non-strict use.

Here's an example of it working with "use strict"
http://jsfiddle.net/ajfym/