Changeset 240188 in webkit
- Timestamp:
- Jan 18, 2019 4:13:28 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240185 r240188 1 2019-01-18 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Audit: don't keep the injected sub-objects alive between runs 4 https://bugs.webkit.org/show_bug.cgi?id=193594 5 <rdar://problem/47398091> 6 7 Reviewed by Joseph Pecoraro. 8 9 Rather than save the `InspectorAuditAccessibilityObject` and `InspectorAuditDOMObject` 10 between individual `Audit.setup` invocations, we should only keep them alive so long as the 11 injected `WebInspectorAudit` object is alive (e.g. from `Audit.setup` to `Audit.teardown`). 12 13 This change fixes inspector/audit/run-accessibility.html. 14 15 * inspector/agents/page/PageAuditAgent.h: 16 * inspector/agents/page/PageAuditAgent.cpp: 17 (WebCore::PageAuditAgent::populateAuditObject): 18 1 19 2019-01-18 Daniel Bates <dabates@apple.com> 2 20 -
trunk/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp
r239976 r240188 27 27 #include "PageAuditAgent.h" 28 28 29 #include "InspectorAuditAccessibilityObject.h" 30 #include "InspectorAuditDOMObject.h" 29 31 #include "JSInspectorAuditAccessibilityObject.h" 30 32 #include "JSInspectorAuditDOMObject.h" … … 82 84 JSC::JSLockHolder lock(execState); 83 85 84 #define ADD_AUDIT_OBJECT(name) \ 85 if (!m_audit##name##Object) \ 86 m_audit##name##Object = InspectorAudit##name##Object::create(*this); \ 87 if (JSC::JSValue inspectorAudit##name##Object = toJS(execState, globalObject, *m_audit##name##Object)) \ 88 auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "" #name ""), inspectorAudit##name##Object); 86 if (JSC::JSValue jsInspectorAuditAccessibilityObject = toJSNewlyCreated(execState, globalObject, InspectorAuditAccessibilityObject::create(*this))) \ 87 auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "Accessibility"), jsInspectorAuditAccessibilityObject); 89 88 90 ADD_AUDIT_OBJECT(Accessibility); 91 ADD_AUDIT_OBJECT(DOM); 92 #undef ADD_AUDIT_OBJECT 89 if (JSC::JSValue jsInspectorAuditDOMObject = toJSNewlyCreated(execState, globalObject, InspectorAuditDOMObject::create(*this))) \ 90 auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "DOM"), jsInspectorAuditDOMObject); 93 91 } 94 92 } -
trunk/Source/WebCore/inspector/agents/page/PageAuditAgent.h
r239976 r240188 26 26 #pragma once 27 27 28 #include "InspectorAuditAccessibilityObject.h"29 #include "InspectorAuditDOMObject.h"30 28 #include "InspectorWebAgentBase.h" 31 29 #include <JavaScriptCore/InspectorAuditAgent.h> … … 51 49 52 50 Page& m_inspectedPage; 53 RefPtr<InspectorAuditAccessibilityObject> m_auditAccessibilityObject;54 RefPtr<InspectorAuditDOMObject> m_auditDOMObject;55 51 }; 56 52
Note: See TracChangeset
for help on using the changeset viewer.