Reviewers: Michael Starzinger,

Description:
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.

Please review this at http://codereview.chromium.org/8356004/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/v8natives.js


Index: src/v8natives.js
===================================================================
--- src/v8natives.js    (revision 9709)
+++ src/v8natives.js    (working copy)
@@ -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

Reply via email to