Index: third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
index dd43f21e7c08ebb54618f63d4adb24b6bc48f2b4..91925a27fb8028456e38c311a63f4afdf292214e 100644 |
--- a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
@@ -32,6 +32,7 @@ |
#include "core/dom/ExecutionContext.h" |
#include "core/events/Event.h" |
+#include "core/frame/Deprecation.h" |
#include "core/frame/UseCounter.h" |
#include "core/frame/csp/ContentSecurityPolicy.h" |
#include "core/inspector/InspectorInstrumentation.h" |
@@ -96,6 +97,19 @@ class SharedWorkerConnectListener final |
void connected() override { m_worker->setIsBeingConnected(false); } |
+ void countFeature(uint32_t feature) override { |
+ static_assert(UseCounter::NumberOfFeatures < UINT32_MAX, |
+ "uint32_t must be larger than number of features"); |
+ UseCounter::Feature useCounterFeature = |
+ static_cast<UseCounter::Feature>(feature); |
+ if (Deprecation::deprecationMessage(useCounterFeature).isEmpty()) { |
+ UseCounter::count(m_worker->getExecutionContext(), useCounterFeature); |
+ } else { |
+ Deprecation::countDeprecation(m_worker->getExecutionContext(), |
+ useCounterFeature); |
+ } |
+ } |
+ |
Persistent<SharedWorker> m_worker; |
}; |