Web Inspector: Audit: don't keep the injected sub-objects alive between runs
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 00:13:28 +0000 (00:13 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 00:13:28 +0000 (00:13 +0000)
commit723a5daae9a27abd732536bec92fff63cfa064b2
tree19a05fa50e1221f2a99626b8bb5b46c205851971
parentc19b39a9dbf68dcc55e57bc99174eb4129dac4fc
Web Inspector: Audit: don't keep the injected sub-objects alive between runs
https://bugs.webkit.org/show_bug.cgi?id=193594
<rdar://problem/47398091>

Reviewed by Joseph Pecoraro.

Rather than save the `InspectorAuditAccessibilityObject` and `InspectorAuditDOMObject`
between individual `Audit.setup` invocations, we should only keep them alive so long as the
injected `WebInspectorAudit` object is alive (e.g. from `Audit.setup` to `Audit.teardown`).

This change fixes inspector/audit/run-accessibility.html.

* inspector/agents/page/PageAuditAgent.h:
* inspector/agents/page/PageAuditAgent.cpp:
(WebCore::PageAuditAgent::populateAuditObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/agents/page/PageAuditAgent.cpp
Source/WebCore/inspector/agents/page/PageAuditAgent.h