diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-05-31 11:52:20 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-05-31 11:52:20 -0700 |
commit | f86a214357ce4e54d0d5c56c7db295ec745814c3 (patch) | |
tree | 2c6954837f85bc586ba348678322267a26a14a73 /deps/v8/src/v8natives.js | |
parent | 0c1aa36835fa6a3557843dcbc6ed6714d353a783 (diff) | |
download | node-new-f86a214357ce4e54d0d5c56c7db295ec745814c3.tar.gz |
Upgrade to V8 2.2.13
Diffstat (limited to 'deps/v8/src/v8natives.js')
-rw-r--r-- | deps/v8/src/v8natives.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/deps/v8/src/v8natives.js b/deps/v8/src/v8natives.js index ed392e2ed0..1d47eb75b9 100644 --- a/deps/v8/src/v8natives.js +++ b/deps/v8/src/v8natives.js @@ -492,23 +492,23 @@ PropertyDescriptor.prototype.hasSetter = function() { function GetOwnProperty(obj, p) { var desc = new PropertyDescriptor(); - // An array with: - // obj is a data property [false, value, Writeable, Enumerable, Configurable] - // obj is an accessor [true, Get, Set, Enumerable, Configurable] + // GetOwnProperty returns an array indexed by the constants + // defined in macros.py. + // If p is not a property on obj undefined is returned. var props = %GetOwnProperty(ToObject(obj), ToString(p)); if (IS_UNDEFINED(props)) return void 0; // This is an accessor - if (props[0]) { - desc.setGet(props[1]); - desc.setSet(props[2]); + if (props[IS_ACCESSOR_INDEX]) { + desc.setGet(props[GETTER_INDEX]); + desc.setSet(props[SETTER_INDEX]); } else { - desc.setValue(props[1]); - desc.setWritable(props[2]); + desc.setValue(props[VALUE_INDEX]); + desc.setWritable(props[WRITABLE_INDEX]); } - desc.setEnumerable(props[3]); - desc.setConfigurable(props[4]); + desc.setEnumerable(props[ENUMERABLE_INDEX]); + desc.setConfigurable(props[CONFIGURABLE_INDEX]); return desc; } |