Chromium Code Reviews| Index: Source/core/workers/WorkerGlobalScope.cpp |
| diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp |
| index 6d6a901ca86fe65db42f79609be6d214c6e2da06..d3d560afee320e7c239610a51d8aab30405939b6 100644 |
| --- a/Source/core/workers/WorkerGlobalScope.cpp |
| +++ b/Source/core/workers/WorkerGlobalScope.cpp |
| @@ -334,9 +334,21 @@ void WorkerGlobalScope::countFeature(UseCounter::Feature) const |
| // FIXME: How should we count features for shared/service workers? |
| } |
| -void WorkerGlobalScope::countDeprecation(UseCounter::Feature) const |
| +void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const |
| { |
| // FIXME: How should we count features for shared/service workers? |
| + |
|
sof
2015/02/05 08:48:18
Could you add a comment (or an assert, if you pref
Kunihiko Sakamoto
2015/02/05 10:35:37
Done.
|
| + // For each deprecated feature, send console message at most once |
| + // per worker lifecycle. |
| + if (!m_deprecationWarningBits) { |
| + m_deprecationWarningBits = adoptPtr(new BitVector(UseCounter::NumberOfFeatures)); |
| + m_deprecationWarningBits->clearAll(); |
| + } |
| + if (!m_deprecationWarningBits->quickGet(feature)) { |
| + m_deprecationWarningBits->quickSet(feature); |
| + ASSERT(!UseCounter::deprecationMessage(feature).isEmpty()); |
| + executionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, UseCounter::deprecationMessage(feature))); |
|
sof
2015/02/05 08:48:18
We know currently from calling context that execut
Kunihiko Sakamoto
2015/02/05 10:35:37
Done.
|
| + } |
| } |
| ConsoleMessageStorage* WorkerGlobalScope::messageStorage() |