Bug 146422

Summary: Crash under _layoutForNodeHighlight: when inspecting espn.com
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: joepeck, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch joepeck: review+

Description Simon Fraser (smfr) 2015-06-29 13:39:38 PDT
Crash under _layoutForNodeHighlight: when inspecting espn.com
Comment 1 Simon Fraser (smfr) 2015-06-29 13:40:34 PDT
Created attachment 255770 [details]
Patch
Comment 2 Joseph Pecoraro 2015-06-29 13:48:19 PDT
Comment on attachment 255770 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255770&action=review

Would be really good to know what type of node we aren't highlighting / getting a quad for.

> Source/WebKit2/UIProcess/WKInspectorHighlightView.mm:215
>  - (void)_layoutForNodeHighlight:(const Highlight&)highlight

WebKit1 has nearly identical code which will need to be updated.
Comment 3 Simon Fraser (smfr) 2015-06-29 14:03:22 PDT
Created attachment 255774 [details]
Patch
Comment 4 Joseph Pecoraro 2015-06-29 14:15:59 PDT
Comment on attachment 255774 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255774&action=review

r=me

> Source/WebKit/mac/WebInspector/WebNodeHighlightView.mm:266
> +    NSUInteger numLayers = (NSUInteger)h->quads.size();

Not really sure the NSInteger cast is necessary. This could just be:

    if (!h->quads.size()) {
Comment 5 Simon Fraser (smfr) 2015-06-30 15:01:51 PDT
https://trac.webkit.org/r186134