Skip to content
Permalink
Browse files
Web Inspector: `inspector/debugger/breakpoints/resolved-dump-all-paus…
…e-locations.html` is a flakey failure

https://bugs.webkit.org/show_bug.cgi?id=239134
rdar://91639437

Reviewed by Devin Rousso.

This test was flaky because the only piece of code in the test keeping the SourceProvider alive for `dump-multiline.js`
was the `function test()`, which is replaced by the `function test()` in the test page itself. This meant that the
function from dump-multiline.js would be garbage collected at some point, and since it was the last possible way to
reach source code in `dump-multiline.js`, the SourceProvider was also disposed of at the same time.

Normally this would not be an issue for users because the source code itself is still viewable in Web Inspector, and
breakpoints can still be set (and will be triggered after a reload). The issue here is that when we attach Web Inspector
the source code is longer reachable, so the backend doesn't send information for it to the frontend for it (until a page
reload), but this test is assuming the script will have been sent from the backend to associate with the resource.

* LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
* LayoutTests/inspector/debugger/breakpoints/resources/dump-multiline.js:

Canonical link: https://commits.webkit.org/251030@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
patrickangle committed May 26, 2022
1 parent 840bec7 commit 6bcebc24ec21fb6df605026a9ce0d7cb7ba68a17
Showing 2 changed files with 15 additions and 15 deletions.
@@ -2818,15 +2818,15 @@ PAUSES AT: 3:0

INSERTING AT: 0:0
PAUSES AT: 1:4
-> 0 #function test() {
-> 0 #function multilineTest() {
=> 1 |var x;
2 }
3
4 // Strings

INSERTING AT: 1:5
PAUSES AT: 2:0
0 function test() {
0 function multilineTest() {
-> 1 v#ar x;
=> 2 |}
3
@@ -2835,13 +2835,13 @@ PAUSES AT: 2:0

INSERTING AT: 2:1
PAUSES AT: 5:0
0 function test() {
0 function multilineTest() {
1 var x;
-> 2 }#
3
4 // Strings
=> 5 |let multiline1 = "test\
6 string", multiline2 = test();
6 string", multiline2 = multilineTest();
7
8 // Template Strings

@@ -2851,7 +2851,7 @@ PAUSES AT: 6:9
3
4 // Strings
-> 5 l#et multiline1 = "test\
=> 6 string", |multiline2 = test();
=> 6 string", |multiline2 = multilineTest();
7
8 // Template Strings
9 let multiline3 = `test
@@ -2861,21 +2861,21 @@ PAUSES AT: 9:0
3
4 // Strings
5 let multiline1 = "test\
-> 6 string", m#ultiline2 = test();
-> 6 string", m#ultiline2 = multilineTest();
7
8 // Template Strings
=> 9 |let multiline3 = `test
10 string`, multiline4 = test();
10 string`, multiline4 = multilineTest();
11
12 // Comments

INSERTING AT: 9:1
PAUSES AT: 10:9
6 string", multiline2 = test();
6 string", multiline2 = multilineTest();
7
8 // Template Strings
-> 9 l#et multiline3 = `test
=> 10 string`, |multiline4 = test();
=> 10 string`, |multiline4 = multilineTest();
11
12 // Comments
13 /* test
@@ -2885,11 +2885,11 @@ PAUSES AT: 14:11
7
8 // Template Strings
9 let multiline3 = `test
-> 10 string`, m#ultiline4 = test();
-> 10 string`, m#ultiline4 = multilineTest();
11
12 // Comments
13 /* test
=> 14 comment */ |let multiline5 = test();
=> 14 comment */ |let multiline5 = multilineTest();
15


@@ -1,15 +1,15 @@
function test() {
function multilineTest() {
var x;
}

// Strings
let multiline1 = "test\
string", multiline2 = test();
string", multiline2 = multilineTest();

// Template Strings
let multiline3 = `test
string`, multiline4 = test();
string`, multiline4 = multilineTest();

// Comments
/* test
comment */ let multiline5 = test();
comment */ let multiline5 = multilineTest();

0 comments on commit 6bcebc2

Please sign in to comment.