Index: src/js/v8natives.js |
diff --git a/src/js/v8natives.js b/src/js/v8natives.js |
index 3113aa76dccc33e1dbf074d1e35ca7db58aa48c6..f1c5f838b4110c7cea5464ed918da57243c4017d 100644 |
--- a/src/js/v8natives.js |
+++ b/src/js/v8natives.js |
@@ -772,6 +772,13 @@ |
} |
+// ES5 section 15.2.3.4. |
+function ObjectGetOwnPropertyNames(obj) { |
+ obj = TO_OBJECT(obj); |
+ return %GetOwnPropertyKeys(obj, PROPERTY_FILTER_SKIP_SYMBOLS); |
+} |
+ |
+ |
// ES5 section 15.2.3.6. |
function ObjectDefineProperty(obj, p, attributes) { |
// The new pure-C++ implementation doesn't support O.o. |
@@ -789,6 +796,11 @@ |
} |
+function GetOwnEnumerablePropertyNames(object) { |
+ return %GetOwnPropertyKeys(object, PROPERTY_FILTER_ONLY_ENUMERABLE); |
+} |
+ |
+ |
// ES5 section 15.2.3.7. |
function ObjectDefineProperties(obj, properties) { |
// The new pure-C++ implementation doesn't support O.o. |
@@ -798,7 +810,7 @@ |
throw MakeTypeError(kCalledOnNonObject, "Object.defineProperties"); |
} |
var props = TO_OBJECT(properties); |
- var names = %GetOwnPropertyKeys(props, PROPERTY_FILTER_ONLY_ENUMERABLE); |
+ var names = GetOwnEnumerablePropertyNames(props); |
var descriptors = new InternalArray(); |
for (var i = 0; i < names.length; i++) { |
descriptors.push(ToPropertyDescriptor(props[names[i]])); |
@@ -871,6 +883,7 @@ |
"defineProperties", ObjectDefineProperties, |
"getPrototypeOf", ObjectGetPrototypeOf, |
"setPrototypeOf", ObjectSetPrototypeOf, |
+ "getOwnPropertyNames", ObjectGetOwnPropertyNames, |
// getOwnPropertySymbols is added in symbol.js. |
"is", SameValue, // ECMA-262, Edition 6, section 19.1.2.10 |
// deliverChangeRecords, getNotifier, observe and unobserve are added |