Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f87677d3a00df19976c4be056c5610e37dbb919b
      
https://github.com/WebKit/WebKit/commit/f87677d3a00df19976c4be056c5610e37dbb919b
  Author: Devin Rousso <[email protected]>
  Date:   2026-10-09 (Fri, 09 Oct 2026)

  Changed paths:
    M LayoutTests/inspector/controller/runtime-controller-expected.txt
    M LayoutTests/inspector/controller/runtime-controller.html
    M Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js

  Log Message:
  -----------
  Web Inspector: await is not supported in console in some scenarios
https://bugs.webkit.org/show_bug.cgi?id=273572
<rdar://problem/127381329>

Reviewed by Timothy Hatcher.

The existing transform only supports a bare `await`, an identifier assignment, 
or a variable declaration.
This misses top-level `await` inside larger expressions and treats 
`await(<expr>)` as an ordinary function call.

Instead, walk the syntax tree looking for nodes that can contain a top-level 
`await`.
Also, use parsed ranges instead of searching for the first `await` as that 
could match an identifier such as `awaiting`.

* Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype._tryApplyAwaitConvenience):
(WI.RuntimeManager.prototype._tryApplyAwaitConvenience.containsTopLevelAwait): 
Added.
(WI.RuntimeManager.prototype._tryApplyAwaitConvenience.getTopLevelAwait): Added.

* LayoutTests/inspector/controller/runtime-controller.html:
* LayoutTests/inspector/controller/runtime-controller-expected.txt:

Canonical link: https://commits.webkit.org/323272@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to