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 15c1f33920f1d6ea47ae5009b9877e0679c52c79..a514234434bceb882b1155caea58c7bee62d768d 100644 |
| --- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
| +++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
| @@ -40,6 +40,7 @@ |
| #include "core/inspector/ConsoleMessage.h" |
| #include "core/inspector/ConsoleMessageStorage.h" |
| #include "core/inspector/WorkerThreadDebugger.h" |
| +#include "core/loader/WorkerFetchContext.h" |
| #include "core/loader/WorkerThreadableLoader.h" |
| #include "core/probe/CoreProbes.h" |
| #include "core/workers/WorkerClients.h" |
| @@ -300,6 +301,13 @@ ExecutionContext* WorkerGlobalScope::GetExecutionContext() const { |
| return const_cast<WorkerGlobalScope*>(this); |
| } |
| +WorkerFetchContext* WorkerGlobalScope::FetchContext() { |
|
nhiroki
2017/04/18 07:56:41
DCHECK(base::FeatureList::IsEnabled(kOffMainThread
horo
2017/04/18 12:53:34
Done.
|
| + if (fetch_context_) |
| + return fetch_context_; |
| + fetch_context_ = WorkerFetchContext::Create(*this); |
| + return fetch_context_; |
| +} |
| + |
| WorkerGlobalScope::WorkerGlobalScope( |
| const KURL& url, |
| const String& user_agent, |
| @@ -376,6 +384,7 @@ DEFINE_TRACE(WorkerGlobalScope) { |
| visitor->Trace(timers_); |
| visitor->Trace(event_listeners_); |
| visitor->Trace(pending_error_events_); |
| + visitor->Trace(fetch_context_); |
| ExecutionContext::Trace(visitor); |
| EventTargetWithInlineData::Trace(visitor); |
| SecurityContext::Trace(visitor); |