Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Web Inspector: CRASH in backend at Inspector::HeapFrontendDispatcher:…
…:garbageCollected + 552 when closing frontend/inspected page https://bugs.webkit.org/show_bug.cgi?id=159075 <rdar://problem/26094341> Reviewed by Joseph Pecoraro. Move the asynchronous work to a task class that can be cancelled when the heap agent is reset, disabled or destroyed. * inspector/agents/InspectorHeapAgent.cpp: (Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask): (Inspector::SendGarbageCollectionEventsTask::addGarbageCollection): (Inspector::SendGarbageCollectionEventsTask::reset): (Inspector::SendGarbageCollectionEventsTask::timerFired): Added. This holds onto GarbageCollection objects that need to be sent asynchronously. It uses the RunLoop variant of Timer and can queue multiple pending objects to be sent. (Inspector::InspectorHeapAgent::InspectorHeapAgent): (Inspector::InspectorHeapAgent::~InspectorHeapAgent): (Inspector::InspectorHeapAgent::disable): Reset the task when disabling or tearing down the agent so the timer doesn't fire after destruction. (Inspector::InspectorHeapAgent::didGarbageCollect): Send the object to the task to be dispatched asynchronously. * inspector/agents/InspectorHeapAgent.h: Canonical link: https://commits.webkit.org/177202@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
82 additions
and 12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters