Web Inspector: AXI: crash when inspecting " bar " text node in getAccessibilityPropertiesForNode layout test. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 000000000000000000 0 + 0 1 com.apple.WebCore 0x000000011310e86b WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties(WebCore::Node*) + 731 2 com.apple.WebCore 0x000000011310f60c non-virtual thunk to WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode(WTF::String*, int, WTF::RefPtr<Inspector::TypeBuilder::DOM::AccessibilityProperties>&) + 44 3 com.apple.WebCore 0x00000001131580a5 Inspector::InspectorDOMBackendDispatcher::getAccessibilityPropertiesForNode(long, Inspector::InspectorObject const&) + 357 4 com.apple.WebCore 0x0000000113155d8f Inspector::InspectorDOMBackendDispatcher::dispatch(long, WTF::String const&, WTF::PassRefPtr<Inspector::InspectorObject>) + 367
<rdar://problem/16334441>
Looks like this was a regression from bug 129779. toElement was being called on non-element nodes including text nodes and document nodes. A simple conditional using node->isElementNode() seems to resolve the issue. Patch coming shortly.
Created attachment 227840 [details] patch The WebCore fix is straightforward. The layout test result diff is obvious, but the layout test source diff is a little large. Among other things I had to rearrange things to reuse the logger on the non-element #document node which was previously specified in a element-only loop.
Comment on attachment 227840 [details] patch Clearing flags on attachment: 227840 Committed r166295: <http://trac.webkit.org/changeset/166295>
All reviewed patches have been landed. Closing bug.