[webkit-reviews] review granted: [Bug 239134] Web Inspector: `inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html` is a flakey failure : [Attachment 457349] Patch v1.0

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 12 12:29:22 PDT 2022


Devin Rousso <drousso at apple.com> has granted Patrick Angle <pangle at apple.com>'s
request for review:
Bug 239134: Web Inspector:
`inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html` is a
flakey failure
https://bugs.webkit.org/show_bug.cgi?id=239134

Attachment 457349: Patch v1.0

https://bugs.webkit.org/attachment.cgi?id=457349&action=review




--- Comment #4 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 457349
  --> https://bugs.webkit.org/attachment.cgi?id=457349
Patch v1.0

View in context: https://bugs.webkit.org/attachment.cgi?id=457349&action=review

r=me

> Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:247
> +    async awaitPendingDispatches()

Rather than have a new method, could we make `runAfterPendingDispatches` just
return a `Promise` if a `callback` is not provided (i.e. just like what we do
with protocol commands in the frontend)?

> LayoutTests/inspector/debugger/breakpoints/resources/dump.js:10
> +    window.addDumpAllPauseLocationsTestCase = async function(suite, {name,
scriptRegex, resourceRegex}) {

Why does this need to be `async`?

> LayoutTests/inspector/debugger/breakpoints/resources/dump.js:27
> +		   await InspectorBackend.awaitPendingDispatches();

Another option to waiting for pending dispatches could be to do something like
`WI.networkManager.mainFrame.resourceCollection.addEventListener(WI.Collection.
Event.ItemAdded, (event) => { ... })`.	I feel like that's probably safer than
just waiting for pending dispatches as I'm not sure it's guaranteed that the
script message is pending (i.e. it could be coming *right* after the current
messages).

> LayoutTests/inspector/debugger/breakpoints/resources/dump.js:51
> +		   await InspectorBackend.awaitPendingDispatches();

possibly a ditto of :27 by waiting for `Debugger.breakpointResolved` instead?


More information about the webkit-reviews mailing list