http://codereview.appspot.com/5648043/diff/3001/src/com/google/caja/ses/startSES.js File src/com/google/caja/ses/startSES.js (right):
http://codereview.appspot.com/5648043/diff/3001/src/com/google/caja/ses/startSES.js#newcode258 src/com/google/caja/ses/startSES.js:258: func.prototype = null; On 2012/02/11 08:36:58, felix8a wrote:
what's the rationale for setting prototype to null?
Only to avoid the cost of freezing an empty prototype object, as well as pointlessly keeping around that unique empty prototype object. This doesn't prevent the function from being used as a constructor, and in fact has the same effect as setting its .prototype to Object.prototype. But this representation is closer to the representation of the built-in non-constructor functions in Ch15 which have no .prototype or [[Construct]] internal method at all, better indicating intent. http://codereview.appspot.com/5648043/
