WebKit Bugzilla
Attachment 361983 Details for
Bug 194632
: Web Inspector: Crash when inspecting an element that constantly changes visibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] For Landing
for-landing-1.patch (text/plain), 4.06 KB, created by
Joseph Pecoraro
on 2019-02-13 19:00:52 PST
(
hide
)
Description:
[PATCH] For Landing
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-02-13 19:00:52 PST
Size:
4.06 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f93f7c4ad2d..650e0b43d54 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-13 Joseph Pecoraro <pecoraro@apple.com> >+ >+ 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-12 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Better categorize CPU usage per-thread / worker >diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >index 3536d78ec0f..6db861a50b9 100644 >--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >@@ -1742,21 +1742,18 @@ Ref<Inspector::Protocol::DOM::EventListener> InspectorDOMAgent::buildObjectForEv > 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 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui > 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); >diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.h b/Source/WebCore/inspector/agents/InspectorDOMAgent.h >index 20ab3d506a6..df1eedcaf6e 100644 >--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.h >+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.h >@@ -248,7 +248,7 @@ private: > 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194632
:
361978
| 361983