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

Unified Diff: src/v8natives.js

Issue 1167473002: Also expose DefineOwnProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/api.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 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;
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698