| Index: third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
|
| index f017b2f0a0105d6190f48991ea1424391747d9a1..95957ef3b80a4c0ec078bf65d230cdc050bffa2c 100644
|
| --- a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp
|
| @@ -25,17 +25,19 @@ MainThreadWorkletGlobalScope::MainThreadWorkletGlobalScope(
|
| MainThreadWorkletGlobalScope::~MainThreadWorkletGlobalScope() {}
|
|
|
| void MainThreadWorkletGlobalScope::countFeature(UseCounter::Feature feature) {
|
| - // TODO(nhiroki): Support UseCounter for main thread worklets. A parent
|
| - // document is on the same thread, so just record API use in the document's
|
| - // UseCounter (https://crbug.com/667357).
|
| + DCHECK(isMainThread());
|
| + // A parent document is on the same thread, so just record API use in the
|
| + // document's UseCounter.
|
| + UseCounter::count(frame(), feature);
|
| }
|
|
|
| void MainThreadWorkletGlobalScope::countDeprecation(
|
| UseCounter::Feature feature) {
|
| + DCHECK(isMainThread());
|
| + // A parent document is on the same thread, so just record API use in the
|
| + // document's UseCounter.
|
| addDeprecationMessage(feature);
|
| - // TODO(nhiroki): Support UseCounter for main thread worklets. A parent
|
| - // document is on the same thread, so just record API use in the document's
|
| - // UseCounter (https://crbug.com/667357).
|
| + Deprecation::countDeprecation(frame(), feature);
|
| }
|
|
|
| WorkerThread* MainThreadWorkletGlobalScope::thread() const {
|
|
|