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

Side by Side Diff: Source/platform/WebThreadSupportingGC.h

Issue 1257723002: Simplify ownership of a ThreadState's interruptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch addInterruptor() to take a PassOwnPtr<> Created 5 years, 5 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebThreadSupportingGC_h 5 #ifndef WebThreadSupportingGC_h
6 #define WebThreadSupportingGC_h 6 #define WebThreadSupportingGC_h
7 7
8 #include "platform/heap/glue/MessageLoopInterruptor.h" 8 #include "platform/heap/glue/MessageLoopInterruptor.h"
9 #include "platform/heap/glue/PendingGCRunner.h" 9 #include "platform/heap/glue/PendingGCRunner.h"
10 #include "public/platform/Platform.h" 10 #include "public/platform/Platform.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 WebThread& platformThread() const 58 WebThread& platformThread() const
59 { 59 {
60 ASSERT(m_thread); 60 ASSERT(m_thread);
61 return *m_thread; 61 return *m_thread;
62 } 62 }
63 63
64 private: 64 private:
65 explicit WebThreadSupportingGC(const char*); 65 explicit WebThreadSupportingGC(const char*);
66 66
67 OwnPtr<PendingGCRunner> m_pendingGCRunner; 67 OwnPtr<PendingGCRunner> m_pendingGCRunner;
68 OwnPtr<MessageLoopInterruptor> m_messageLoopInterruptor;
69 68
70 // FIXME: This has to be last because of crbug.com/401397. 69 // FIXME: This has to be last because of crbug.com/401397.
71 // A WorkerThread might get deleted before it had a chance to properly 70 // A WorkerThread might get deleted before it had a chance to properly
72 // shut down. By deleting the WebThread first, we can guarantee that 71 // shut down. By deleting the WebThread first, we can guarantee that
73 // no pending tasks on the thread might want to access any of the other 72 // no pending tasks on the thread might want to access any of the other
74 // members during the WorkerThread's destruction. 73 // members during the WorkerThread's destruction.
75 OwnPtr<WebThread> m_thread; 74 OwnPtr<WebThread> m_thread;
76 }; 75 };
77 76
78 } 77 }
79 78
80 #endif 79 #endif
OLDNEW
« no previous file with comments | « Source/modules/compositorworker/CompositorWorkerManager.cpp ('k') | Source/platform/WebThreadSupportingGC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698