Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: src/v8natives.js

Issue 1154233003: Introduce v8::Object::CreateDataProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698