Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 39bb2ba631c72cb8779debded6b03f65f256ebb4..1f1911c950a068e554d5c0c5b2ecb2a929078c52 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -4,7 +4,7 @@ |
var $functionSourceString; |
var $globalEval; |
-var $objectDefineArrayProperty; |
+var $objectDefineOwnProperty; |
var $objectGetOwnPropertyDescriptor; |
var $toCompletePropertyDescriptor; |
@@ -896,17 +896,6 @@ function DefineArrayProperty(obj, p, desc, should_throw) { |
} |
-function DefineArrayPropertyFromAPI(obj, p, value) { |
- return DefineArrayProperty(obj, p, ToPropertyDescriptor({ |
- value: value, |
- configurable: true, |
- enumerable: true, |
- writable: true |
- }), |
- false); |
-} |
- |
- |
// ES5 section 8.12.9, ES5 section 15.4.5.1 and Harmony proxies. |
function DefineOwnProperty(obj, p, desc, should_throw) { |
if (%_IsJSProxy(obj)) { |
@@ -923,6 +912,17 @@ function DefineOwnProperty(obj, p, desc, should_throw) { |
} |
+function DefineOwnPropertyFromAPI(obj, p, value, desc) { |
+ return DefineOwnProperty(obj, p, ToPropertyDescriptor({ |
+ value: value, |
+ writable: desc[0], |
+ enumerable: desc[1], |
+ configurable: desc[2] |
+ }), |
+ false); |
+} |
+ |
+ |
// ES6 section 19.1.2.9 |
function ObjectGetPrototypeOf(obj) { |
return %_GetPrototype(TO_OBJECT_INLINE(obj)); |
@@ -1837,7 +1837,7 @@ function GetIterator(obj, method) { |
$functionSourceString = FunctionSourceString; |
$globalEval = GlobalEval; |
-$objectDefineArrayProperty = DefineArrayPropertyFromAPI; |
+$objectDefineOwnProperty = DefineOwnPropertyFromAPI; |
$objectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor; |
$toCompletePropertyDescriptor = ToCompletePropertyDescriptor; |