Revision: 9711 Author: [email protected] Date: Thu Oct 20 00:55:30 2011 Log: Make IsGenericDescriptor spec-conformant.
When the descriptor argument is undefined, the spec is very explicit about the fact that we should return false (not true, like we did previously). I couldn't come up with a test case for this, but the old code leaves a bad feeling about
corner cases, so better play safe. Review URL: http://codereview.chromium.org/8356004 http://code.google.com/p/v8/source/detail?r=9711 Modified: /branches/bleeding_edge/src/v8natives.js ======================================= --- /branches/bleeding_edge/src/v8natives.js Wed Oct 19 06:29:37 2011 +++ /branches/bleeding_edge/src/v8natives.js Thu Oct 20 00:55:30 2011 @@ -373,6 +373,7 @@ // ES5 8.10.3. function IsGenericDescriptor(desc) { + if (IS_UNDEFINED(desc)) return false; return !(IsAccessorDescriptor(desc) || IsDataDescriptor(desc)); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
