⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 294907 in webkit


Ignore:
Timestamp:
May 26, 2022, 4:41:11 PM (4 years ago)
Author:
Patrick Angle
Message:

Web Inspector: inspector/debugger/breakpoints/resolved-dump-all-pause-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

Location:
trunk/LayoutTests/inspector/debugger/breakpoints
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt

    r291746 r294907  
    28192819INSERTING AT: 0:0
    28202820PAUSES AT: 1:4
    2821  ->   0    #function test() {
     2821 ->   0    #function multilineTest() {
    28222822 =>   1        |var x;
    28232823      2    }
    … …  
    28272827INSERTING AT: 1:5
    28282828PAUSES AT: 2:0
    2829       0    function test() {
     2829      0    function multilineTest() {
    28302830 ->   1        v#ar x;
    28312831 =>   2    |}
    … …  
    28362836INSERTING AT: 2:1
    28372837PAUSES AT: 5:0
    2838       0    function test() {
     2838      0    function multilineTest() {
    28392839      1        var x;
    28402840 ->   2    }#
    … …  
    28422842      4    // Strings
    28432843 =>   5    |let multiline1 = "test\
    2844       6    string", multiline2 = test();
     2844      6    string", multiline2 = multilineTest();
    28452845      7
    28462846      8    // Template Strings
    … …  
    28522852      4    // Strings
    28532853 ->   5    l#et multiline1 = "test\
    2854  =>   6    string", |multiline2 = test();
     2854 =>   6    string", |multiline2 = multilineTest();
    28552855      7
    28562856      8    // Template Strings
    … …  
    28622862      4    // Strings
    28632863      5    let multiline1 = "test\
    2864  ->   6    string", m#ultiline2 = test();
     2864 ->   6    string", m#ultiline2 = multilineTest();
    28652865      7
    28662866      8    // Template Strings
    28672867 =>   9    |let multiline3 = `test
    2868      10    string`, multiline4 = test();
     2868     10    string`, multiline4 = multilineTest();
    28692869     11
    28702870     12    // Comments
    … …  
    28722872INSERTING AT: 9:1
    28732873PAUSES AT: 10:9
    2874       6    string", multiline2 = test();
     2874      6    string", multiline2 = multilineTest();
    28752875      7
    28762876      8    // Template Strings
    28772877 ->   9    l#et multiline3 = `test
    2878  =>  10    string`, |multiline4 = test();
     2878 =>  10    string`, |multiline4 = multilineTest();
    28792879     11
    28802880     12    // Comments
    … …  
    28862886      8    // Template Strings
    28872887      9    let multiline3 = `test
    2888  ->  10    string`, m#ultiline4 = test();
     2888 ->  10    string`, m#ultiline4 = multilineTest();
    28892889     11
    28902890     12    // Comments
    28912891     13    /* test
    2892  =>  14    comment */ |let multiline5 = test();
     2892 =>  14    comment */ |let multiline5 = multilineTest();
    28932893     15
    28942894
  • trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-multiline.js

    r291746 r294907  
    1 function test() {
     1function multilineTest() {
    22    var x;
    33}
    … …  
    55// Strings
    66let multiline1 = "test\
    7 string", multiline2 = test();
     7string", multiline2 = multilineTest();
    88
    99// Template Strings
    1010let multiline3 = `test
    11 string`, multiline4 = test();
     11string`, multiline4 = multilineTest();
    1212
    1313// Comments
    1414/* test
    15 comment */ let multiline5 = test();
     15comment */ let multiline5 = multilineTest();
Note: See TracChangeset for help on using the changeset viewer.