Commit a90f1748 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by V8 LUCI CQ

[inspector] De-flake inspector/debugger/get-possible-breakpoints.js.

Since the inspector does not longer hold on strongly to Script objects
after they were collected by V8, this test was relying on the GC to not
collect the scripts too eagerly in case where nothing else holds on to
the script. So explicitly adding a global object property assignment
here in those cases to ensure that the Script is kept alive.

Fixed: chromium:1314212, v8:12699
Bug: chromium:1246884, chromium:1295659
Change-Id: Ia16fcf841aeb29bf131fc6fa066f120d342f94b2
Doc: https://bit.ly/v8-inspector-script-caching
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3576117
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79852}
parent 63af265f
......@@ -273,12 +273,12 @@ function foo() { function boo() { #return 239# }; #boo #}
#
function foo() { let boo = #function() { #return 239# }; #}
#
#() => { #239 #}
var foo = #() => { #239 #}
#
function foo() { #239 #}
#
#() => #239#
#() => { #return 239# }#
var foo = #() => #239#
var foo = #() => { #return 239# }#
Running test: argumentsAsCalls
function foo(){#}
......
......@@ -137,11 +137,11 @@ function foo6() { Promise.resolve().then(() => 42) }
.then(() => checkSource('function foo() { function boo() { return 239 } }\n', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('function foo() { function boo() { return 239 }; boo }\n', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('function foo() { let boo = function() { return 239 }; }\n', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('() => { 239 }\n', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('var foo = () => { 239 }\n', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('function foo() { 239 }\n', { lineNumber: 0, columnNumber: 0 }))
// TODO(kozyatinskiy): lineNumber for return position should be only 9, not 8.
.then(() => checkSource('() => 239', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('() => { return 239 }', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('var foo = () => 239', { lineNumber: 0, columnNumber: 0 }))
.then(() => checkSource('var foo = () => { return 239 }', { lineNumber: 0, columnNumber: 0 }))
.then(next);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment