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

Side by Side Diff: Source/core/workers/WorkerThread.h

Issue 552323002: DevTools: log worker thread ids on the main thread when Timeline recording is enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/WorkerInspectorProxy.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // going to call runDebuggerTask in a loop. 88 // going to call runDebuggerTask in a loop.
89 void willEnterNestedLoop(); 89 void willEnterNestedLoop();
90 void didLeaveNestedLoop(); 90 void didLeaveNestedLoop();
91 91
92 WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScop e.get(); } 92 WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScop e.get(); }
93 bool terminated() const { return m_terminated; } 93 bool terminated() const { return m_terminated; }
94 94
95 // Number of active worker threads. 95 // Number of active worker threads.
96 static unsigned workerThreadCount(); 96 static unsigned workerThreadCount();
97 97
98 PlatformThreadId platformThreadId() const;
99
98 void interruptAndDispatchInspectorCommands(); 100 void interruptAndDispatchInspectorCommands();
99 void setWorkerInspectorController(WorkerInspectorController*); 101 void setWorkerInspectorController(WorkerInspectorController*);
100 102
101 protected: 103 protected:
102 WorkerThread(WorkerLoaderProxy&, WorkerReportingProxy&, PassOwnPtrWillBe RawPtr<WorkerThreadStartupData>); 104 WorkerThread(WorkerLoaderProxy&, WorkerReportingProxy&, PassOwnPtrWillBe RawPtr<WorkerThreadStartupData>);
103 105
104 // Factory method for creating a new worker context for the thread. 106 // Factory method for creating a new worker context for the thread.
105 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScop e(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>) = 0; 107 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScop e(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>) = 0;
106 108
107 virtual void postInitialize() { } 109 virtual void postInitialize() { }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // WorkerThread might get deleted before it had a chance to properly 147 // WorkerThread might get deleted before it had a chance to properly
146 // shut down. By deleting the WebThread first, we can guarantee that 148 // shut down. By deleting the WebThread first, we can guarantee that
147 // no pending tasks on the thread might want to access any of the other 149 // no pending tasks on the thread might want to access any of the other
148 // members during the WorkerThread's destruction. 150 // members during the WorkerThread's destruction.
149 OwnPtr<blink::WebThread> m_thread; 151 OwnPtr<blink::WebThread> m_thread;
150 }; 152 };
151 153
152 } // namespace blink 154 } // namespace blink
153 155
154 #endif // WorkerThread_h 156 #endif // WorkerThread_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerInspectorProxy.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698