diff options
Diffstat (limited to 'deps/v8/test/debugger/test-api.js')
-rw-r--r-- | deps/v8/test/debugger/test-api.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/test/debugger/test-api.js b/deps/v8/test/debugger/test-api.js index 1b978eb157..53c80ec99a 100644 --- a/deps/v8/test/debugger/test-api.js +++ b/deps/v8/test/debugger/test-api.js @@ -463,7 +463,12 @@ class DebugWrapper { "Runtime.getProperties", { objectId : objectId, ownProperties: true }); this.sendMessage(msg); const reply = this.takeReplyChecked(msgid); - return Object(reply.result.internalProperties[0].value.value); + for (const internalProperty of reply.result.internalProperties) { + if (internalProperty.name === '[[PrimitiveValue]]') { + return Object(internalProperty.value.value); + } + } + throw new Error('Remote object is not a value wrapper'); } reconstructRemoteObject(obj) { |