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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThreadLifecycleObserver.cpp

Issue 2025783002: Worker: Introduce an observation mechanism for WorkerThread termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delayed_task
Patch Set: remake and add tests Created 4 years, 6 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/core/workers/WorkerThreadLifecycleObserver.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThreadLifecycleObserver.cpp b/third_party/WebKit/Source/core/workers/WorkerThreadLifecycleObserver.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..164b8da9cc47a2e4dea0183749c7caf6030e4edd
--- /dev/null
+++ b/third_party/WebKit/Source/core/workers/WorkerThreadLifecycleObserver.cpp
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/workers/WorkerThreadLifecycleObserver.h"
+
+#include "core/workers/WorkerThread.h"
+#include "wtf/Assertions.h"
+#include "wtf/WTF.h"
+
+namespace blink {
+
+WorkerThreadLifecycleObserver::WorkerThreadLifecycleObserver(WorkerThreadContext* workerThreadContext)
+ : LifecycleObserver(workerThreadContext)
+ , m_wasContextDestroyedBeforeObserverCreation(workerThreadContext->m_wasContextDestroyed)
+{
+ DCHECK(isMainThread());
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698