Bug 87214 - Short-circuit Element::attrIfExists() when the Element has no Attr list.
Summary: Short-circuit Element::attrIfExists() when the Element has no Attr list.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 22:31 PDT by Andreas Kling
Modified: 2012-05-22 23:17 PDT (History)
0 users

See Also:


Attachments
A patchwork orange (1.30 KB, patch)
2012-05-22 22:32 PDT, Andreas Kling
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-05-22 22:31:37 PDT
Lukewarm (0.4%) on Dromaeo/dom-attr.
Comment 1 Andreas Kling 2012-05-22 22:32:43 PDT
Created attachment 143463 [details]
A patchwork orange
Comment 2 Ryosuke Niwa 2012-05-22 22:34:09 PDT
Comment on attachment 143463 [details]
A patchwork orange

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

> Source/WebCore/dom/Element.cpp:2087
> +    if (!hasAttrList())
> +        return 0;
>      if (!attributeData())
>          return 0;

Should we combine these if statements?
Comment 3 Ryosuke Niwa 2012-05-22 22:37:35 PDT
Comment on attachment 143463 [details]
A patchwork orange

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

>> Source/WebCore/dom/Element.cpp:2087
>>          return 0;
> 
> Should we combine these if statements?

Per IRC discussion, please convert the latter condition to an assertion.
Comment 4 Andreas Kling 2012-05-22 23:17:24 PDT
Committed r118127: <http://trac.webkit.org/changeset/118127>