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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebased upto r451733 Created 3 years, 10 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/WorkerThread.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerThread.h
index e7a8629e66aee570fea13ab1012268faffeafb6f..cb6ece4c641d417f27ff2da8c01c2e4fbcfd04da 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.h
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.h
@@ -309,7 +309,10 @@ class CORE_EXPORT WorkerThread : public WebThread::TaskObserver {
// mayForciblyTerminateExecution() for details.
TaskHandle m_forcibleTerminationTaskHandle;
- Persistent<WorkerThreadLifecycleContext> m_workerThreadLifecycleContext;
+ // Created on the main thread heap, but will be accessed cross-thread
+ // when worker thread posts tasks.
+ CrossThreadPersistent<WorkerThreadLifecycleContext>
+ m_workerThreadLifecycleContext;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698