Changeset 241495 in webkit
- Timestamp:
- Feb 13, 2019 7:38:40 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r241494 r241495 1 2019-02-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Crash when inspecting an element that constantly changes visibility 4 https://bugs.webkit.org/show_bug.cgi?id=194632 5 <rdar://problem/48060258> 6 7 Reviewed by Matt Baker and Devin Rousso. 8 9 * inspector/agents/InspectorDOMAgent.h: 10 * inspector/agents/InspectorDOMAgent.cpp: 11 (WebCore::InspectorDOMAgent::processAccessibilityChildren): 12 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): 13 Don't use rvalue-references as that was taking ownership and deleting 14 the object we want to keep around. Instead simplify this to just use 15 references so no ref counting changes happen. 16 1 17 2019-02-13 Chris Fleizach <cfleizach@apple.com> 2 18 -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
r241110 r241495 1743 1743 return value; 1744 1744 } 1745 1746 void InspectorDOMAgent::processAccessibilityChildren( RefPtr<AccessibilityObject>&& axObject, RefPtr<JSON::ArrayOf<int>>&& childNodeIds)1747 { 1748 const auto& children = axObject ->children();1745 1746 void InspectorDOMAgent::processAccessibilityChildren(AccessibilityObject& axObject, JSON::ArrayOf<int>& childNodeIds) 1747 { 1748 const auto& children = axObject.children(); 1749 1749 if (!children.size()) 1750 1750 return; 1751 1752 if (!childNodeIds) 1753 childNodeIds = JSON::ArrayOf<int>::create(); 1754 1751 1755 1752 for (const auto& childObject : children) { 1756 1753 if (Node* childNode = childObject->node()) 1757 childNodeIds ->addItem(pushNodePathToFrontend(childNode));1754 childNodeIds.addItem(pushNodePathToFrontend(childNode)); 1758 1755 else 1759 processAccessibilityChildren( childObject.copyRef(), childNodeIds.copyRef());1756 processAccessibilityChildren(*childObject, childNodeIds); 1760 1757 } 1761 1758 } … … 1833 1830 } 1834 1831 1835 processAccessibilityChildren(axObject, WTFMove(childNodeIds)); 1832 if (!axObject->children().isEmpty()) { 1833 childNodeIds = JSON::ArrayOf<int>::create(); 1834 processAccessibilityChildren(*axObject, *childNodeIds); 1835 } 1836 1836 1837 1837 Vector<Element*> controlledElements; -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h
r239183 r241495 249 249 Ref<Inspector::Protocol::DOM::EventListener> buildObjectForEventListener(const RegisteredEventListener&, int identifier, const AtomicString& eventType, Node*, const String* objectGroupId, bool disabled, bool hasBreakpoint); 250 250 RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> buildObjectForAccessibilityProperties(Node*); 251 void processAccessibilityChildren( RefPtr<AccessibilityObject>&&, RefPtr<JSON::ArrayOf<int>>&&);251 void processAccessibilityChildren(AccessibilityObject&, JSON::ArrayOf<int>&); 252 252 253 253 Node* nodeForPath(const String& path);
Note: See TracChangeset
for help on using the changeset viewer.