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/src/inspector | |
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/src/inspector')
-rw-r--r-- | deps/v8/src/inspector/v8-debugger.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/v8/src/inspector/v8-debugger.cc b/deps/v8/src/inspector/v8-debugger.cc index 9b0ca38018..0f3fd0377e 100644 --- a/deps/v8/src/inspector/v8-debugger.cc +++ b/deps/v8/src/inspector/v8-debugger.cc @@ -29,8 +29,10 @@ v8::MaybeLocal<v8::Array> collectionsEntries(v8::Local<v8::Context> context, v8::Isolate* isolate = context->GetIsolate(); v8::Local<v8::Array> entries; bool isKeyValue = false; - if (!v8::debug::EntriesPreview(isolate, value, &isKeyValue).ToLocal(&entries)) + if (!value->IsObject() || + !value.As<v8::Object>()->PreviewEntries(&isKeyValue).ToLocal(&entries)) { return v8::MaybeLocal<v8::Array>(); + } v8::Local<v8::Array> wrappedEntries = v8::Array::New(isolate); CHECK(!isKeyValue || wrappedEntries->Length() % 2 == 0); |