From a76f72605bd81d861cf99298664b40ef5303365e Mon Sep 17 00:00:00 2001 From: Sigurd Schneider Date: Mon, 28 Jun 2021 15:55:51 +0200 Subject: [PATCH] Add test for https://crrev.com/c/2992710 Change-Id: Icd0acbc07698ef59804a6aae01b347e1e173cba9 Bug: chromium:1213393 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2992711 Commit-Queue: Sigurd Schneider Auto-Submit: Sigurd Schneider Reviewed-by: Yang Guo Cr-Commit-Position: refs/heads/master@{#75418} --- .../exception-thrown-metadata-expected.txt | 37 +++++++++++++++++++ .../runtime/exception-thrown-metadata.js | 1 + 2 files changed, 38 insertions(+) diff --git a/test/inspector/runtime/exception-thrown-metadata-expected.txt b/test/inspector/runtime/exception-thrown-metadata-expected.txt index 1196547c9d..29cc469044 100644 --- a/test/inspector/runtime/exception-thrown-metadata-expected.txt +++ b/test/inspector/runtime/exception-thrown-metadata-expected.txt @@ -132,3 +132,40 @@ Check that exceptionThrown is supported by test runner. timestamp : } } +{ + method : Runtime.exceptionThrown + params : { + exceptionDetails : { + columnNumber : 2 + exception : { + className : Object + description : Object + objectId : + preview : { + description : Object + overflow : false + properties : [ + ] + type : object + } + type : object + } + exceptionId : + executionContextId : + lineNumber : 1 + stackTrace : { + callFrames : [ + [0] : { + columnNumber : 2 + functionName : + lineNumber : 1 + scriptId : + url : + } + ] + } + text : Uncaught [object Object] + } + timestamp : + } +} diff --git a/test/inspector/runtime/exception-thrown-metadata.js b/test/inspector/runtime/exception-thrown-metadata.js index dc7e9ebadd..140b7e58d0 100644 --- a/test/inspector/runtime/exception-thrown-metadata.js +++ b/test/inspector/runtime/exception-thrown-metadata.js @@ -9,4 +9,5 @@ Protocol.Runtime.onExceptionThrown(message => InspectorTest.logMessage(message)) contextGroup.addScript("throw inspector.newExceptionWithMetaData('myerror', 'foo', 'bar');"); Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw inspector.newExceptionWithMetaData('myerror2', 'foo2', 'bar2'); }, 0)" }); Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw 2; }, 0)" }); +Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw {}; }, 0)" }); InspectorTest.waitForPendingTasks().then(InspectorTest.completeTest);