Chromium Code Reviews| 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 ece0725351f377c948d311295949c44635fcac15..3fcc6597ee789f86756ea5f8742c97b8d4305002 100644 |
| --- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
| +++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
| @@ -90,8 +90,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 (!m_deprecationWarningBits.quickGet(feature)) { |
|
dtapuska
2016/08/26 14:37:22
Do you need the DCHECKS here you lose without usin
Rick Byers
2016/08/26 14:55:48
Sure. It seems pretty unlikely to be an issue but
|
| + m_deprecationWarningBits.quickSet(feature); |
| DCHECK(!Deprecation::deprecationMessage(feature).isEmpty()); |
| DCHECK(getExecutionContext()); |
| getExecutionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, Deprecation::deprecationMessage(feature))); |
| @@ -296,6 +296,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_closing(false) |