Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp

Issue 2558643005: Worker: Enable UseCounter for MainThreadWorkletGlobalScope (Closed)
Patch Set: fix KURL Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698