diff options
Diffstat (limited to 'deps/v8/test/inspector/runtime/get-properties.js')
-rw-r--r-- | deps/v8/test/inspector/runtime/get-properties.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/deps/v8/test/inspector/runtime/get-properties.js b/deps/v8/test/inspector/runtime/get-properties.js index 35bc0dd895..6cb3e39909 100644 --- a/deps/v8/test/inspector/runtime/get-properties.js +++ b/deps/v8/test/inspector/runtime/get-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-private-fields +// Flags: --harmony-private-fields --allow-natives-syntax let {session, contextGroup, Protocol} = InspectorTest.start('Checks Runtime.getProperties method'); @@ -52,6 +52,21 @@ InspectorTest.runAsyncTestSuite([ } }, + async function testDetachedArrayBuffer() { + await Protocol.Runtime.evaluate({ expression: 'var a = new ArrayBuffer(16)' }); + await Protocol.Runtime.evaluate({ expression: 'var b = new Uint32Array(a)' }); + let objectId = await evaluateToObjectId('a'); + await Protocol.Runtime.evaluate({ expression: '%ArrayBufferDetach(a)' }); + await Protocol.Runtime.evaluate({ expression: 'b', generatePreview: true }) + let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true }); + for (let prop of props.result.result) { + if (prop.name === '__proto__') + continue; + InspectorTest.log(prop.name); + await logGetPropertiesResult(prop.value.objectId); + } + }, + async function testArrayBufferWithBrokenUintCtor() { await evaluateToObjectId(`(function() { this.uint8array_old = this.Uint8Array; |