| Index: third_party/WebKit/Source/core/page/EventSource.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/EventSource.cpp b/third_party/WebKit/Source/core/page/EventSource.cpp
|
| index 77c3b18399948f3563ca17992661c1d2d4fd23e5..6320657a10cb2042da2d323c31d5706054ccf1a0 100644
|
| --- a/third_party/WebKit/Source/core/page/EventSource.cpp
|
| +++ b/third_party/WebKit/Source/core/page/EventSource.cpp
|
| @@ -43,6 +43,7 @@
|
| #include "core/events/MessageEvent.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "core/frame/csp/ContentSecurityPolicy.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| #include "core/inspector/InspectorInstrumentation.h"
|
| @@ -75,6 +76,11 @@ inline EventSource::EventSource(ExecutionContext* context, const KURL& url, cons
|
|
|
| EventSource* EventSource::create(ExecutionContext* context, const String& url, const EventSourceInit& eventSourceInit, ExceptionState& exceptionState)
|
| {
|
| + if (context->isDocument())
|
| + UseCounter::count(toDocument(context), UseCounter::EventSourceDocument);
|
| + else
|
| + UseCounter::count(context, UseCounter::EventSourceWorker);
|
| +
|
| if (url.isEmpty()) {
|
| exceptionState.throwDOMException(SyntaxError, "Cannot open an EventSource to an empty URL.");
|
| return nullptr;
|
|
|