[Webkit-unassigned] [Bug 56334] Web Inspector: crash upon "//html//@id" search in elements panel.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 23:21:11 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56334





--- Comment #4 from Pavel Feldman <pfeldman at chromium.org>  2011-03-14 23:21:11 PST ---
(From update of attachment 85719)
View in context: https://bugs.webkit.org/attachment.cgi?id=85719&action=review

>> Source/WebCore/inspector/InspectorDOMAgent.cpp:211
>>              if (!ec)
> 
> In WebCore, any code that looks at exception codes is responsible for initializing them. So, there should be "ec = 0;" inside the loop.

I don't follow. There is ExceptionCode ec = 0; above. I quit as soon as I hit ec != 0. See the for condition.

>> Source/WebCore/inspector/InspectorDOMAgent.cpp:212
>>                  resultCollector.add(node);
> 
> This should probably go inside the (!ec) block. Or make it an early continue check. "if (ec) continue;" 
> 
> Are there other node types we should avoid here? Should we whitelist certain types?
> 
> Other then this, the patch looks good to me.

Good catch. I can't think of any other type - we are only interested in node types with broken "parentNode" link.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list