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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2011-10-20 07:55:30 +00:00
parent d107773867
commit 3edfb4bbbc

View File

@ -373,6 +373,7 @@ function IsDataDescriptor(desc) {
// ES5 8.10.3.
function IsGenericDescriptor(desc) {
if (IS_UNDEFINED(desc)) return false;
return !(IsAccessorDescriptor(desc) || IsDataDescriptor(desc));
}