diff --git a/common.gypi b/common.gypi index 8f598c63aee632..960c169a789c5d 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.32', + 'v8_embedder_string': '-node.33', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/inspector/value-mirror.cc b/deps/v8/src/inspector/value-mirror.cc index c2fa9b46cc0067..a345a8db38675e 100644 --- a/deps/v8/src/inspector/value-mirror.cc +++ b/deps/v8/src/inspector/value-mirror.cc @@ -656,6 +656,18 @@ class SymbolMirror final : public ValueMirror { .build(); } + void buildEntryPreview( + v8::Local context, int* nameLimit, int* indexLimit, + std::unique_ptr* preview) const override { + *preview = + ObjectPreview::create() + .setType(RemoteObject::TypeEnum::Symbol) + .setDescription(descriptionForSymbol(context, m_symbol)) + .setOverflow(false) + .setProperties(std::make_unique>()) + .build(); + } + v8::Local v8Value() const override { return m_symbol; } protocol::Response buildWebDriverValue( diff --git a/deps/v8/test/inspector/debugger/object-preview-internal-properties-expected.txt b/deps/v8/test/inspector/debugger/object-preview-internal-properties-expected.txt index 56f992237a2ebd..1bdef8231b2523 100644 --- a/deps/v8/test/inspector/debugger/object-preview-internal-properties-expected.txt +++ b/deps/v8/test/inspector/debugger/object-preview-internal-properties-expected.txt @@ -159,6 +159,88 @@ expression: new WeakSet([{}]) ] +Running test: symbolsAsKeysInEntries +expression: new Map([[Symbol('key1'), 1]]) +{ + name : size + type : number + value : 1 +} +[[Entries]]: +[ + [0] : { + key : { + description : Symbol(key1) + overflow : false + properties : [ + ] + type : symbol + } + value : { + description : 1 + overflow : false + properties : [ + ] + type : number + } + } +] + +expression: new Set([Symbol('key2')]) +{ + name : size + type : number + value : 1 +} +[[Entries]]: +[ + [0] : { + value : { + description : Symbol(key2) + overflow : false + properties : [ + ] + type : symbol + } + } +] + +expression: new WeakMap([[Symbol('key3'), 2]]) +[[Entries]]: +[ + [0] : { + key : { + description : Symbol(key3) + overflow : false + properties : [ + ] + type : symbol + } + value : { + description : 2 + overflow : false + properties : [ + ] + type : number + } + } +] + +expression: new WeakSet([Symbol('key4')]) +[[Entries]]: +[ + [0] : { + value : { + description : Symbol(key4) + overflow : false + properties : [ + ] + type : symbol + } + } +] + + Running test: iteratorObject expression: (new Map([[1,2]])).entries() [[Entries]]: diff --git a/deps/v8/test/inspector/debugger/object-preview-internal-properties.js b/deps/v8/test/inspector/debugger/object-preview-internal-properties.js index f542683aa49159..d2b3a7816339e9 100644 --- a/deps/v8/test/inspector/debugger/object-preview-internal-properties.js +++ b/deps/v8/test/inspector/debugger/object-preview-internal-properties.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Flags: --harmony-class-fields +// Flags: --harmony-symbol-as-weakmap-key let {session, contextGroup, Protocol} = InspectorTest.start("Check internal properties reported in object preview."); @@ -45,6 +45,15 @@ InspectorTest.runTestSuite([ .then(next); }, + function symbolsAsKeysInEntries(next) + { + checkExpression("new Map([[Symbol('key1'), 1]])") + .then(() => checkExpression("new Set([Symbol('key2')])")) + .then(() => checkExpression("new WeakMap([[Symbol('key3'), 2]])")) + .then(() => checkExpression("new WeakSet([Symbol('key4')])")) + .then(next); + }, + function iteratorObject(next) { checkExpression("(new Map([[1,2]])).entries()")