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

Unified Diff: src/v8natives.js

Issue 1073953004: Expose Object::DefineOwnProperty on the API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 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
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 6b0aa2058841ce49215fcc1cb51013cc10227a10..ccad0684eeabb0165e7ce58fa43fccccdc1d53c3 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -714,6 +714,19 @@ function DefineProxyProperty(obj, p, attributes, should_throw) {
}
+function DefineObjectPropertyFromAPI(obj, p, value, configurable, enumerable,
+ writable) {
+ DefineObjectProperty(obj, p, ToPropertyDescriptor({
adamk 2015/04/15 16:31:53 I think you're entering too late, and should call
+ value: value,
+ configurable: configurable,
+ enumerable: enumerable,
+ writable: writable
+ }),
+ true);
+ return this;
+}
+
+
// ES5 8.12.9.
function DefineObjectProperty(obj, p, desc, should_throw) {
var current_array = %GetOwnProperty(obj, ToName(p));

Powered by Google App Engine
This is Rietveld 408576698