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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 CrossThreadPersistent<WorkerOrWorkletGlobalScope> m_globalScope; 302 CrossThreadPersistent<WorkerOrWorkletGlobalScope> m_globalScope;
303 CrossThreadPersistent<WorkerInspectorController> m_workerInspectorController; 303 CrossThreadPersistent<WorkerInspectorController> m_workerInspectorController;
304 304
305 // Signaled when the thread completes termination on the worker thread. 305 // Signaled when the thread completes termination on the worker thread.
306 std::unique_ptr<WaitableEvent> m_shutdownEvent; 306 std::unique_ptr<WaitableEvent> m_shutdownEvent;
307 307
308 // Used to cancel a scheduled forcible termination task. See 308 // Used to cancel a scheduled forcible termination task. See
309 // mayForciblyTerminateExecution() for details. 309 // mayForciblyTerminateExecution() for details.
310 TaskHandle m_forcibleTerminationTaskHandle; 310 TaskHandle m_forcibleTerminationTaskHandle;
311 311
312 Persistent<WorkerThreadLifecycleContext> m_workerThreadLifecycleContext; 312 // Created on the main thread heap, but will be accessed cross-thread
313 // when worker thread posts tasks.
314 CrossThreadPersistent<WorkerThreadLifecycleContext>
315 m_workerThreadLifecycleContext;
313 }; 316 };
314 317
315 } // namespace blink 318 } // namespace blink
316 319
317 #endif // WorkerThread_h 320 #endif // WorkerThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698