Bug 112317 - Need to use const String in HTMLVideoElement::posterImageURL
Summary: Need to use const String in HTMLVideoElement::posterImageURL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: michaelbai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 20:16 PDT by michaelbai
Modified: 2013-03-18 09:14 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2013-03-13 20:23 PDT, michaelbai
no flags Details | Formatted Diff | Diff
Patch (1.62 KB, patch)
2013-03-13 20:29 PDT, michaelbai
no flags Details | Formatted Diff | Diff
Patch (1.61 KB, patch)
2013-03-14 10:04 PDT, michaelbai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description michaelbai 2013-03-13 20:16:34 PDT
Need to use const String instead of  "const AtomicString&" which means we’ll do an extra hash lookup
Comment 1 michaelbai 2013-03-13 20:23:36 PDT
Created attachment 193054 [details]
Patch
Comment 2 michaelbai 2013-03-13 20:29:45 PDT
Created attachment 193055 [details]
Patch
Comment 3 Alexey Proskuryakov 2013-03-14 09:54:34 PDT
Comment on attachment 193055 [details]
Patch

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

r=me with correction below.

> Source/WebCore/ChangeLog:11
> +        Need to use const String instead of const AtomicString& which means we will do an extra hash lookup

We don't normally use const with local variables, so not "const String".

> Source/WebCore/html/HTMLVideoElement.cpp:320
> +    const String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());

Should be "String", not "const String"
Comment 4 michaelbai 2013-03-14 10:04:03 PDT
Created attachment 193143 [details]
Patch
Comment 5 michaelbai 2013-03-14 10:04:47 PDT
Comment on attachment 193055 [details]
Patch

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

>> Source/WebCore/ChangeLog:11
>> +        Need to use const String instead of const AtomicString& which means we will do an extra hash lookup
> 
> We don't normally use const with local variables, so not "const String".

Change to use string. thanks
Comment 6 WebKit Review Bot 2013-03-18 09:14:22 PDT
Comment on attachment 193143 [details]
Patch

Clearing flags on attachment: 193143

Committed r146069: <http://trac.webkit.org/changeset/146069>
Comment 7 WebKit Review Bot 2013-03-18 09:14:25 PDT
All reviewed patches have been landed.  Closing bug.