Index: third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp |
index f0e6d0003f039faa1730bf1cc5e1e3956877a441..eb81c9b02c5b51ad343555facaf4df31a8fec75b 100644 |
--- a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp |
@@ -29,6 +29,7 @@ |
#include "core/fetch/CSSStyleSheetResource.h" |
#include "core/fetch/FetchInitiatorInfo.h" |
#include "core/fetch/ResourceFetcher.h" |
+#include "core/frame/Deprecation.h" |
#include "core/frame/Settings.h" |
#include "core/loader/DocumentLoader.h" |
#include "platform/Histogram.h" |
@@ -91,6 +92,10 @@ void HTMLResourcePreloader::preload(std::unique_ptr<PreloadRequest> preload, con |
DEFINE_STATIC_LOCAL(CustomCountHistogram, preloadDelayHistogram, ("WebCore.PreloadDelayMs", 0, 2000, 20)); |
preloadDelayHistogram.count(duration); |
+ if (preload->scriptHasInvalidTypeOrLanguage()) { |
+ Deprecation::countDeprecation(m_document, UseCounter::ScriptInvalidTypeOrLanguage); |
+ } |
+ |
Resource* resource = m_document->loader()->startPreload(preload->resourceType(), request); |
if (resource && preload->resourceType() == Resource::CSSStyleSheet) { |
Settings* settings = m_document->settings(); |