Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index eb259177e2a5e24cf859019a9286f3e03abaaba2..39bb2ba631c72cb8779debded6b03f65f256ebb4 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -4,6 +4,7 @@ |
var $functionSourceString; |
var $globalEval; |
+var $objectDefineArrayProperty; |
var $objectGetOwnPropertyDescriptor; |
var $toCompletePropertyDescriptor; |
@@ -895,6 +896,17 @@ 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)) { |
@@ -1825,6 +1837,7 @@ function GetIterator(obj, method) { |
$functionSourceString = FunctionSourceString; |
$globalEval = GlobalEval; |
+$objectDefineArrayProperty = DefineArrayPropertyFromAPI; |
$objectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor; |
$toCompletePropertyDescriptor = ToCompletePropertyDescriptor; |