RESOLVED WONTFIX 64044
Don't call into Image::loadPlatformResource() for Chromium Autofill popup items without icons
https://bugs.webkit.org/show_bug.cgi?id=64044
Summary Don't call into Image::loadPlatformResource() for Chromium Autofill popup ite...
Ilya Sherman
Reported 2011-07-06 16:50:31 PDT
Don't call into Image::loadPlatformResource() for Chromium Autofill popup items without icons
Attachments
Patch (3.04 KB, patch)
2011-07-06 16:54 PDT, Ilya Sherman
abarth: review-
Ilya Sherman
Comment 1 2011-07-06 16:54:04 PDT
Adam Barth
Comment 2 2011-07-06 18:27:48 PDT
Comment on attachment 99901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=99901&action=review R- for lack of tests. > Source/WebCore/ChangeLog:8 > + No new tests because the changes are all in platform-specific Chromium Autofill code. That's not a reason not to have tests! > Source/WebCore/platform/chromium/PopupMenuChromium.cpp:1043 > + image = Image::loadPlatformResource(itemIcon.utf8().data()); Bad indent > Source/WebCore/platform/chromium/PopupMenuChromium.cpp:1192 > - RefPtr<Image> image(Image::loadPlatformResource(icon.utf8().data())); > + RefPtr<Image> image; > + if (!icon.isEmpty()) > + image = Image::loadPlatformResource(icon.utf8().data()); I don't really understand this pattern. Why doesn't loadPlatformResource just return a null ptr if icon is empty? > Source/WebCore/platform/chromium/PopupMenuChromium.cpp:1382 > + iconImage = Image::loadPlatformResource(icon.utf8().data()); Bad indent.
Ilya Sherman
Comment 3 2011-07-07 15:01:00 PDT
(In reply to comment #2) > > Source/WebCore/platform/chromium/PopupMenuChromium.cpp:1192 > > - RefPtr<Image> image(Image::loadPlatformResource(icon.utf8().data())); > > + RefPtr<Image> image; > > + if (!icon.isEmpty()) > > + image = Image::loadPlatformResource(icon.utf8().data()); > > I don't really understand this pattern. Why doesn't loadPlatformResource just return a null ptr if icon is empty? Fair enough, I'll make that change instead.
Note You need to log in before you can comment on or make changes to this bug.