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

Unified Diff: include/v8.h

Issue 1943773002: Add v8::Object::GetOwnPropertyNames(context, filter) method (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 83b777d30948104bec43ba3c9926cd68ff637690..a17962816dbb4f600e2403c48e421b594b58999d 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2654,6 +2654,15 @@ enum AccessControl {
PROHIBITS_OVERWRITING = 1 << 2
};
+enum PropertyFilter {
+ ALL_PROPERTIES = 0,
+ ONLY_WRITABLE = 1,
Yang 2016/05/03 13:50:20 "ONLY" is a bit misleading. When you use 3 as filt
jochen (gone - plz use gerrit) 2016/05/03 14:44:39 would be nice to have a comment that says that thi
kozy 2016/05/03 17:37:46 Acknowledged.
kozy 2016/05/03 17:37:46 Done.
+ ONLY_ENUMERABLE = 2,
+ ONLY_CONFIGURABLE = 4,
+ SKIP_STRINGS = 8,
+ SKIP_SYMBOLS = 16
+};
+
/**
* Integrity level for objects.
*/
@@ -2814,6 +2823,15 @@ class V8_EXPORT Object : public Value {
Local<Context> context);
/**
+ * Returns an array containing the names of the filtered properties
+ * of this object, including properties from prototype objects. The
+ * array returned by this method contains the same values as would
+ * be enumerated by a for-in statement over this object.
+ */
+ V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetOwnPropertyNames(
+ Local<Context> context, PropertyFilter filter);
+
+ /**
* Get the prototype object. This does not skip objects marked to
* be skipped by __proto__ and it does not consult the security
* handler.
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698