OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // (This is signalled on the main thread, so it's assumed to be waited o
n the worker context thread) | 61 // (This is signalled on the main thread, so it's assumed to be waited o
n the worker context thread) |
62 blink::WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get();
} | 62 blink::WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get();
} |
63 | 63 |
64 bool isCurrentThread() const; | 64 bool isCurrentThread() const; |
65 WorkerRunLoop& runLoop() { return m_runLoop; } | 65 WorkerRunLoop& runLoop() { return m_runLoop; } |
66 WorkerLoaderProxy& workerLoaderProxy() const { return m_workerLoaderProx
y; } | 66 WorkerLoaderProxy& workerLoaderProxy() const { return m_workerLoaderProx
y; } |
67 WorkerReportingProxy& workerReportingProxy() const { return m_workerRepo
rtingProxy; } | 67 WorkerReportingProxy& workerReportingProxy() const { return m_workerRepo
rtingProxy; } |
68 | 68 |
69 // Number of active worker threads. | 69 // Number of active worker threads. |
70 static unsigned workerThreadCount(); | 70 static unsigned workerThreadCount(); |
71 static void releaseFastMallocFreeMemoryInAllThreads(); | |
72 | 71 |
73 NotificationClient* getNotificationClient() { return m_notificationClien
t; } | 72 NotificationClient* getNotificationClient() { return m_notificationClien
t; } |
74 void setNotificationClient(NotificationClient* client) { m_notificationC
lient = client; } | 73 void setNotificationClient(NotificationClient* client) { m_notificationC
lient = client; } |
75 | 74 |
76 protected: | 75 protected: |
77 WorkerThread(WorkerLoaderProxy&, WorkerReportingProxy&, PassOwnPtrWillBe
RawPtr<WorkerThreadStartupData>); | 76 WorkerThread(WorkerLoaderProxy&, WorkerReportingProxy&, PassOwnPtrWillBe
RawPtr<WorkerThreadStartupData>); |
78 | 77 |
79 // Factory method for creating a new worker context for the thread. | 78 // Factory method for creating a new worker context for the thread. |
80 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScop
e(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>) = 0; | 79 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScop
e(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>) = 0; |
81 | 80 |
(...skipping 20 matching lines...) Expand all Loading... |
102 | 101 |
103 NotificationClient* m_notificationClient; | 102 NotificationClient* m_notificationClient; |
104 | 103 |
105 // Used to signal thread shutdown. | 104 // Used to signal thread shutdown. |
106 OwnPtr<blink::WebWaitableEvent> m_shutdownEvent; | 105 OwnPtr<blink::WebWaitableEvent> m_shutdownEvent; |
107 }; | 106 }; |
108 | 107 |
109 } // namespace WebCore | 108 } // namespace WebCore |
110 | 109 |
111 #endif // WorkerThread_h | 110 #endif // WorkerThread_h |
OLD | NEW |