Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c15a33b6094aff226bc49acb8f1310b195d0d10b
      
https://github.com/WebKit/WebKit/commit/c15a33b6094aff226bc49acb8f1310b195d0d10b
  Author: Devin Rousso <[email protected]>
  Date:   2024-07-15 (Mon, 15 Jul 2024)

  Changed paths:
    M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp

  Log Message:
  -----------
  Web Inspector: Debugger: further harden async stack trace code after 
278872@main
https://bugs.webkit.org/show_bug.cgi?id=274349

Reviewed by Darin Adler.

It's probably true that 278872@main fixed the surface issue, but it might not 
have addressed the underlying problem. 
<https://github.com/WebKit/WebKit/pull/28619#discussion_r1602409360>

This change represents a few speculative fixes that should hopefully further 
prevent any sort of issue like that.
- Use `InspectorDebuggeragent::currentParentStackTrace` wherever possible to 
avoid duplicating that code.
- Use `HashMap::get` instead of `HashMap::find` to also check that the returned 
pointer is valid.
- Only remove from `m_pendingAsyncCalls` if not `AsyncStackTrace::isPending` 
*and* if it's not also used elsewhere in `m_currentAsyncCallIdentifierStack`.
- Still call `AsyncStackTrace::didDispatchAsyncCall` even if there are no 
current async calls (i.e. just in case 
`InspectorDebuggerAgent::willDispatchAsyncCall` is somehow not called).

* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):
(Inspector::InspectorDebuggerAgent::didCancelAsyncCall):
(Inspector::InspectorDebuggerAgent::willDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didDispatchAsyncCall):
(Inspector::InspectorDebuggerAgent::didPause):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to