Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index daedd57d2ea097b390f9602cf1368b45244b5291..4ea5b4230b85b7ba7b485c66cceb7c68f52c4aae 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -55,6 +55,7 @@
#include "platform/network/ContentSecurityPolicyResponseHeaders.h"
#include "platform/network/NetworkUtils.h"
#include "platform/weborigin/SecurityOrigin.h"
+#include "platform/TraceEvent.h"
#include "public/platform/Platform.h"
#include "public/platform/WebURLRequest.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
@@ -256,6 +257,7 @@ void WebEmbeddedWorkerImpl::postMessageToPageInspector(const String& message)
void WebEmbeddedWorkerImpl::postTaskToLoader(const WebTraceLocation& location, std::unique_ptr<ExecutionContextTask> task)
{
+ TRACE_EVENT0("ServiceWorker", "WebEmbeddedWorkerImpl::postTaskToLoader");
// TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and
// consider using m_mainThreadTaskRunners->get(TaskType::Networking)
// instead.
@@ -264,6 +266,8 @@ void WebEmbeddedWorkerImpl::postTaskToLoader(const WebTraceLocation& location, s
void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(const WebTraceLocation& location, std::unique_ptr<ExecutionContextTask> task)
{
+ TRACE_EVENT0("ServiceWorker", "WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope");
+ // LOG(ERROR) << "WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope";
if (m_askedToTerminate || !m_workerThread)
return;
m_workerThread->postTask(location, std::move(task));

Powered by Google App Engine
This is Rietveld 408576698