Skip to content

Commit

Permalink
Cherry-pick cd62341. rdar://124104099
Browse files Browse the repository at this point in the history
    Web Inspector: Crash in Inspector::InspectorDebuggerAgent::didScheduleAsyncCall on knowyourmeme.com
    https://bugs.webkit.org/show_bug.cgi?id=270139
    rdar://123667952

    Reviewed by Pascoe.

    Avoid reading past the end of `m_pendingAsyncCalls`.

    * Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
    (Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):

    Canonical link: https://commits.webkit.org/272448.684@safari-7618-branch
  • Loading branch information
charliewolfe authored and Mohsin Qureshi committed Mar 7, 2024
1 parent ddc0b64 commit 767096f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ void InspectorDebuggerAgent::didScheduleAsyncCall(JSC::JSGlobalObject* globalObj
if (!m_currentAsyncCallIdentifierStack.isEmpty()) {
auto it = m_pendingAsyncCalls.find(m_currentAsyncCallIdentifierStack.last());
ASSERT(it != m_pendingAsyncCalls.end());
parentStackTrace = it->value;
if (LIKELY(it != m_pendingAsyncCalls.end()))
parentStackTrace = it->value;
}

auto identifier = asyncCallIdentifier(asyncCallType, callbackId);
Expand Down

0 comments on commit 767096f

Please sign in to comment.