diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-05-18 18:49:41 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-05-19 01:02:13 +0200 |
commit | 143a2f8d67a81154bdb2849999837fb0a5c13d8e (patch) | |
tree | 43aeb4cd24e924d2db05972cdb8c1c1ddb36540b /deps/v8/include | |
parent | 3ff723f940c9b18f281131fad1d0c967c45169dd (diff) | |
download | android-node-v8-143a2f8d67a81154bdb2849999837fb0a5c13d8e.tar.gz android-node-v8-143a2f8d67a81154bdb2849999837fb0a5c13d8e.tar.bz2 android-node-v8-143a2f8d67a81154bdb2849999837fb0a5c13d8e.zip |
deps: cherry-pick ff0a9793334 from upstream V8
Original commit message:
[api] Expose PreviewEntries as public API
Turn `debug::EntriesPreview` into a public API.
This is a straightforward approach to addressing
nodejs/node#20409
(not relying on functionality behind `--allow-natives-syntax`)
in Node.js.
Refs: https://github.com/v8/v8/commit/ff0a979333408f544f081489411814b84df6e2d9
PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'deps/v8/include')
-rw-r--r-- | deps/v8/include/v8.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 201c2cc05c..31407fa083 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -3503,6 +3503,17 @@ class V8_EXPORT Object : public Value { */ Isolate* GetIsolate(); + /** + * If this object is a Set, Map, WeakSet or WeakMap, this returns a + * representation of the elements of this object as an array. + * If this object is a SetIterator or MapIterator, this returns all + * elements of the underlying collection, starting at the iterator's current + * position. + * For other types, this will return an empty MaybeLocal<Array> (without + * scheduling an exception). + */ + MaybeLocal<Array> PreviewEntries(bool* is_key_value); + static Local<Object> New(Isolate* isolate); V8_INLINE static Object* Cast(Value* obj); |