Bug 130290 - Web Inspector: AXI: crash when inspecting "bar" text node in getAccessibilityPropertiesForNode layout test
Summary: Web Inspector: AXI: crash when inspecting "bar" text node in getAccessibility...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: James Craig
Keywords: InRadar
Depends on:
Reported: 2014-03-14 23:07 PDT by James Craig
Modified: 2014-03-26 08:19 PDT (History)
7 users (show)

See Also:

patch (7.11 KB, patch)
2014-03-26 02:38 PDT, James Craig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2014-03-14 23:07:12 PDT
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
Comment 1 Radar WebKit Bug Importer 2014-03-14 23:07:31 PDT
Comment 2 James Craig 2014-03-26 01:38:45 PDT
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.
Comment 3 James Craig 2014-03-26 02:38:31 PDT
Created attachment 227840 [details]

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 4 WebKit Commit Bot 2014-03-26 08:18:57 PDT
Comment on attachment 227840 [details]

Clearing flags on attachment: 227840

Committed r166295: <http://trac.webkit.org/changeset/166295>
Comment 5 WebKit Commit Bot 2014-03-26 08:19:00 PDT
All reviewed patches have been landed.  Closing bug.