| Index: Source/core/frame/UseCounter.cpp
|
| diff --git a/Source/core/frame/UseCounter.cpp b/Source/core/frame/UseCounter.cpp
|
| index 494b305ccab529be3c7bb2468df4b0e6adb83ecd..d405e4f352793284bbdebbe084e59554ecdddf88 100644
|
| --- a/Source/core/frame/UseCounter.cpp
|
| +++ b/Source/core/frame/UseCounter.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "core/frame/FrameConsole.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/workers/WorkerGlobalScope.h"
|
| #include "public/platform/Platform.h"
|
|
|
| namespace WebCore {
|
| @@ -606,9 +607,14 @@ void UseCounter::count(const Document& document, Feature feature)
|
|
|
| void UseCounter::count(const ExecutionContext* context, Feature feature)
|
| {
|
| - if (!context || !context->isDocument())
|
| + if (!context)
|
| + return;
|
| + if (context->isDocument()) {
|
| + count(*toDocument(context), feature);
|
| return;
|
| - count(*toDocument(context), feature);
|
| + }
|
| + if (context->isWorkerGlobalScope())
|
| + toWorkerGlobalScope(context)->countFeature(feature);
|
| }
|
|
|
| void UseCounter::countDeprecation(ExecutionContext* context, Feature feature)
|
|
|