| Index: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| index e1aff2aec72b87ffba4af9a81c36b36f0783a39a..1e0aba35177f7198e6d6d2850c90152f4dacbb86 100644
|
| --- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
| @@ -74,6 +74,7 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
|
| : m_url(url)
|
| , m_userAgent(userAgent)
|
| , m_v8CacheOptions(V8CacheOptionsDefault)
|
| + , m_deprecationWarningBits(UseCounter::NumberOfFeatures)
|
| , m_scriptController(WorkerOrWorkletScriptController::create(this, thread->isolate()))
|
| , m_thread(thread)
|
| , m_workerInspectorController(WorkerInspectorController::create(this))
|
| @@ -342,8 +343,8 @@ void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const
|
| DCHECK(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isCompositorWorkerGlobalScope());
|
| // For each deprecated feature, send console message at most once
|
| // per worker lifecycle.
|
| - if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) {
|
| - m_deprecationWarningBits.recordMeasurement(feature);
|
| + if (!UseCounter::isMuted() && m_deprecationWarningBits.quickGet(feature)) {
|
| + m_deprecationWarningBits.quickSet(feature);
|
| DCHECK(!Deprecation::deprecationMessage(feature).isEmpty());
|
| DCHECK(getExecutionContext());
|
| getExecutionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, Deprecation::deprecationMessage(feature)));
|
|
|