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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void setWorkerInspectorController(WorkerInspectorController*); | 115 void setWorkerInspectorController(WorkerInspectorController*); |
116 | 116 |
117 protected: | 117 protected: |
118 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); | 118 WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); |
119 | 119 |
120 // Factory method for creating a new worker context for the thread. | 120 // Factory method for creating a new worker context for the thread. |
121 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa
ssOwnPtr<WorkerThreadStartupData>) = 0; | 121 virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(Pa
ssOwnPtr<WorkerThreadStartupData>) = 0; |
122 | 122 |
123 virtual void postInitialize() { } | 123 virtual void postInitialize() { } |
124 | 124 |
| 125 // Both of these methods are called in the worker thread. |
| 126 virtual void initializeBackingThread(); |
| 127 virtual void shutdownBackingThread(); |
| 128 |
125 virtual v8::Isolate* initializeIsolate(); | 129 virtual v8::Isolate* initializeIsolate(); |
126 virtual void willDestroyIsolate(); | 130 virtual void willDestroyIsolate(); |
127 virtual void destroyIsolate(); | 131 virtual void destroyIsolate(); |
128 virtual void terminateV8Execution(); | 132 virtual void terminateV8Execution(); |
129 | 133 |
130 // This is protected virtual for testing. | 134 // This is protected virtual for testing. |
131 virtual bool doIdleGc(double deadlineSeconds); | 135 virtual bool doIdleGc(double deadlineSeconds); |
132 | 136 |
133 private: | 137 private: |
134 friend class WorkerSharedTimer; | 138 friend class WorkerSharedTimer; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Used to signal thread shutdown. | 170 // Used to signal thread shutdown. |
167 OwnPtr<WebWaitableEvent> m_shutdownEvent; | 171 OwnPtr<WebWaitableEvent> m_shutdownEvent; |
168 | 172 |
169 // Used to signal thread termination. | 173 // Used to signal thread termination. |
170 OwnPtr<WebWaitableEvent> m_terminationEvent; | 174 OwnPtr<WebWaitableEvent> m_terminationEvent; |
171 }; | 175 }; |
172 | 176 |
173 } // namespace blink | 177 } // namespace blink |
174 | 178 |
175 #endif // WorkerThread_h | 179 #endif // WorkerThread_h |
OLD | NEW |