[webkit-reviews] review granted: [Bug 117065] Clean up CachedResourceRequest initiators : [Attachment 203592] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 3 14:59:26 PDT 2013
Darin Adler <darin at apple.com> has granted Zan Dobersek
<zandobersek at gmail.com>'s request for review:
Bug 117065: Clean up CachedResourceRequest initiators
https://bugs.webkit.org/show_bug.cgi?id=117065
Attachment 203592: Patch
https://bugs.webkit.org/attachment.cgi?id=203592&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=203592&action=review
I’m OK with this change, but think it could be better.
> Source/WebCore/html/parser/HTMLPreloadScanner.cpp:102
> + default:
Adding this default case gets rid of the compile time checking that we have all
the tag values covered. Could you undo that change?
> Source/WebCore/loader/cache/CachedResourceRequestInitiator.h:30
> +#include "ThreadGlobalData.h"
> +#include <wtf/text/AtomicString.h>
This file should not be including these headers.
> Source/WebCore/loader/cache/CachedResourceRequestInitiator.h:34
> +enum CachedResourceRequestInitiator {
Can we use a shorter name for this class and this source file? I suggest
CacheRequestInitiator or LoadInitiator or LoadInitiatorType.
> Source/WebCore/page/PerformanceResourceTiming.cpp:105
> + DEFINE_STATIC_LOCAL(const String, cssName, (ASCIILiteral("css")));
> + DEFINE_STATIC_LOCAL(const String, embedName, (ASCIILiteral("embed")));
> + DEFINE_STATIC_LOCAL(const String, imageName, (ASCIILiteral("img")));
> + DEFINE_STATIC_LOCAL(const String, linkName, (ASCIILiteral("link")));
> + DEFINE_STATIC_LOCAL(const String, objectName, (ASCIILiteral("object")));
> + DEFINE_STATIC_LOCAL(const String, scriptName, (ASCIILiteral("script")));
> + DEFINE_STATIC_LOCAL(const String, subdocumentName,
(ASCIILiteral("subdocument")));
> + DEFINE_STATIC_LOCAL(const String, svgName, (ASCIILiteral("svg")));
> + DEFINE_STATIC_LOCAL(const String, xmlhttprequestName,
(ASCIILiteral("xmlhttprequest")));
> + DEFINE_STATIC_LOCAL(const String, otherName, (ASCIILiteral("other")));
Is having a global for each of these an important optimization?
More information about the webkit-reviews
mailing list