| Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
|
| index 2ba42a23abf2a2dbbcc21f99e7df660e33cf1740..96c717073d6b5e1dab734768e4a507c741c68df8 100644
|
| --- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
|
| @@ -225,16 +225,21 @@ WebSharedWorkerImpl::createClientMessageLoop() {
|
|
|
| // WorkerReportingProxy --------------------------------------------------------
|
|
|
| -void WebSharedWorkerImpl::countFeature(UseCounter::Feature) {
|
| - // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to
|
| - // the browser process and ask each connected document to record API use in
|
| - // its UseCounter (https://crbug.com/376039).
|
| +void WebSharedWorkerImpl::countFeature(UseCounter::Feature feature) {
|
| + static_assert(UseCounter::NumberOfFeatures < UINT32_MAX,
|
| + "uint32_t must be larger than number of features");
|
| + m_parentFrameTaskRunners->get(TaskType::UnspecedTimer)
|
| + ->postTask(BLINK_FROM_HERE,
|
| + crossThreadBind(&WebSharedWorkerClient::countFeature,
|
| + crossThreadUnretained(m_client),
|
| + static_cast<uint32_t>(feature)));
|
| }
|
|
|
| -void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature) {
|
| - // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to
|
| - // the browser process and ask each connected document to record API use in
|
| - // its UseCounter (https://crbug.com/376039).
|
| +void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature feature) {
|
| + // Go through the same code path with countFeature() because a deprecation
|
| + // message is already shown on the worker console and a remaining work is just
|
| + // to record an API use.
|
| + countFeature(feature);
|
| }
|
|
|
| void WebSharedWorkerImpl::reportException(const String& errorMessage,
|
|
|