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

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebase fixup 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/web/WebSharedWorkerImpl.h
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.h b/third_party/WebKit/Source/web/WebSharedWorkerImpl.h
index 3393d9d6cc5e1e06314b8584ecce922cb1ecfa66..cac4d64982a089f7af4257843f0b0de357536e15 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.h
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.h
@@ -157,7 +157,8 @@ class WebSharedWorkerImpl final : public WorkerReportingProxy,
std::unique_ptr<WTF::CrossThreadClosure>) override;
// 'shadow page' - created to proxy loading requests from the worker.
- Persistent<ExecutionContext> m_loadingDocument;
+ // Will be accessed by worker thread when posting tasks.
+ CrossThreadPersistent<ExecutionContext> m_loadingDocument;
haraken 2017/02/20 23:57:18 Ditto.
WebView* m_webView;
Persistent<WebLocalFrameImpl> m_mainFrame;
bool m_askedToTerminate;
@@ -167,7 +168,8 @@ class WebSharedWorkerImpl final : public WorkerReportingProxy,
Persistent<WorkerInspectorProxy> m_workerInspectorProxy;
- Persistent<ParentFrameTaskRunners> m_parentFrameTaskRunners;
+ // Owned by the main thread, but will be accessed by the worker.
+ CrossThreadPersistent<ParentFrameTaskRunners> m_parentFrameTaskRunners;
std::unique_ptr<WorkerThread> m_workerThread;

Powered by Google App Engine
This is Rietveld 408576698