Chromium Code Reviews| Index: Source/core/html/parser/HTMLPreloadScanner.cpp |
| diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp |
| index 8ac2ad63be48149957c15c07014b789da8821c5f..2865b39e6bfe55f54efeefcf7f184fe538944549 100644 |
| --- a/Source/core/html/parser/HTMLPreloadScanner.cpp |
| +++ b/Source/core/html/parser/HTMLPreloadScanner.cpp |
| @@ -537,10 +537,13 @@ void TokenPreloadScanner::scanCommon(const Token& token, const SegmentedString& |
| const typename Token::Attribute* equivAttribute = token.getAttributeItem(http_equivAttr); |
| if (equivAttribute) { |
| String equivAttributeValue(equivAttribute->value); |
| - if (equalIgnoringCase(equivAttributeValue, "content-security-policy")) |
| + if (equalIgnoringCase(equivAttributeValue, "content-security-policy")) { |
| m_isCSPEnabled = true; |
| - else if (equalIgnoringCase(equivAttributeValue, "accept-ch")) |
| - handleAcceptClientHintsHeader(equivAttributeValue, m_clientHintsPreferences, nullptr); |
| + } else if (equalIgnoringCase(equivAttributeValue, "accept-ch")) { |
| + const typename Token::Attribute* contentAttribute = token.getAttributeItem(contentAttr); |
| + if (contentAttribute) |
| + handleAcceptClientHintsHeader(String(contentAttribute->value), m_clientHintsPreferences, nullptr); |
|
Mike West
2015/06/19 12:16:07
Heh. Your reviewer should totally have caught that
|
| + } |
| return; |
| } |
| const typename Token::Attribute* nameAttribute = token.getAttributeItem(nameAttr); |