Title: [241535] releases/WebKitGTK/webkit-2.24/Source/WebCore
- Revision
- 241535
- Author
- [email protected]
- Date
- 2019-02-14 03:28:23 -0800 (Thu, 14 Feb 2019)
Log Message
Merge r241495 - Web Inspector: Crash when inspecting an element that constantly changes visibility
https://bugs.webkit.org/show_bug.cgi?id=194632
<rdar://problem/48060258>
Patch by Joseph Pecoraro <[email protected]> on 2019-02-13
Reviewed by Matt Baker and Devin Rousso.
* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::processAccessibilityChildren):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
Don't use rvalue-references as that was taking ownership and deleting
the object we want to keep around. Instead simplify this to just use
references so no ref counting changes happen.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (241534 => 241535)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-14 11:28:19 UTC (rev 241534)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-14 11:28:23 UTC (rev 241535)
@@ -1,3 +1,19 @@
+2019-02-13 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Crash when inspecting an element that constantly changes visibility
+ https://bugs.webkit.org/show_bug.cgi?id=194632
+ <rdar://problem/48060258>
+
+ Reviewed by Matt Baker and Devin Rousso.
+
+ * inspector/agents/InspectorDOMAgent.h:
+ * inspector/agents/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::processAccessibilityChildren):
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+ Don't use rvalue-references as that was taking ownership and deleting
+ the object we want to keep around. Instead simplify this to just use
+ references so no ref counting changes happen.
+
2019-02-13 Chris Fleizach <[email protected]>
AX: Crash in handleMenuOpen
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (241534 => 241535)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2019-02-14 11:28:19 UTC (rev 241534)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp 2019-02-14 11:28:23 UTC (rev 241535)
@@ -1742,21 +1742,18 @@
value->setHasBreakpoint(hasBreakpoint);
return value;
}
-
-void InspectorDOMAgent::processAccessibilityChildren(RefPtr<AccessibilityObject>&& axObject, RefPtr<JSON::ArrayOf<int>>&& childNodeIds)
+
+void InspectorDOMAgent::processAccessibilityChildren(AccessibilityObject& axObject, JSON::ArrayOf<int>& childNodeIds)
{
- const auto& children = axObject->children();
+ const auto& children = axObject.children();
if (!children.size())
return;
-
- if (!childNodeIds)
- childNodeIds = JSON::ArrayOf<int>::create();
-
+
for (const auto& childObject : children) {
if (Node* childNode = childObject->node())
- childNodeIds->addItem(pushNodePathToFrontend(childNode));
+ childNodeIds.addItem(pushNodePathToFrontend(childNode));
else
- processAccessibilityChildren(childObject.copyRef(), childNodeIds.copyRef());
+ processAccessibilityChildren(*childObject, childNodeIds);
}
}
@@ -1832,7 +1829,10 @@
checked = Inspector::Protocol::DOM::AccessibilityProperties::Checked::True;
}
- processAccessibilityChildren(axObject, WTFMove(childNodeIds));
+ if (!axObject->children().isEmpty()) {
+ childNodeIds = JSON::ArrayOf<int>::create();
+ processAccessibilityChildren(*axObject, *childNodeIds);
+ }
Vector<Element*> controlledElements;
axObject->elementsFromAttribute(controlledElements, aria_controlsAttr);
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.h (241534 => 241535)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.h 2019-02-14 11:28:19 UTC (rev 241534)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/inspector/agents/InspectorDOMAgent.h 2019-02-14 11:28:23 UTC (rev 241535)
@@ -248,7 +248,7 @@
RefPtr<JSON::ArrayOf<Inspector::Protocol::DOM::Node>> buildArrayForPseudoElements(const Element&, NodeToIdMap* nodesMap);
Ref<Inspector::Protocol::DOM::EventListener> buildObjectForEventListener(const RegisteredEventListener&, int identifier, const AtomicString& eventType, Node*, const String* objectGroupId, bool disabled, bool hasBreakpoint);
RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> buildObjectForAccessibilityProperties(Node*);
- void processAccessibilityChildren(RefPtr<AccessibilityObject>&&, RefPtr<JSON::ArrayOf<int>>&&);
+ void processAccessibilityChildren(AccessibilityObject&, JSON::ArrayOf<int>&);
Node* nodeForPath(const String& path);
Node* nodeForObjectId(const String& objectId);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes