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 | |
129 virtual v8::Isolate* initializeIsolate(); | 125 virtual v8::Isolate* initializeIsolate(); |
130 virtual void willDestroyIsolate(); | 126 virtual void willDestroyIsolate(); |
131 virtual void destroyIsolate(); | 127 virtual void destroyIsolate(); |
132 virtual void terminateV8Execution(); | 128 virtual void terminateV8Execution(); |
133 | 129 |
134 // This is protected virtual for testing. | 130 // This is protected virtual for testing. |
135 virtual bool doIdleGc(double deadlineSeconds); | 131 virtual bool doIdleGc(double deadlineSeconds); |
136 | 132 |
137 private: | 133 private: |
138 friend class WorkerSharedTimer; | 134 friend class WorkerSharedTimer; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // Used to signal thread shutdown. | 166 // Used to signal thread shutdown. |
171 OwnPtr<WebWaitableEvent> m_shutdownEvent; | 167 OwnPtr<WebWaitableEvent> m_shutdownEvent; |
172 | 168 |
173 // Used to signal thread termination. | 169 // Used to signal thread termination. |
174 OwnPtr<WebWaitableEvent> m_terminationEvent; | 170 OwnPtr<WebWaitableEvent> m_terminationEvent; |
175 }; | 171 }; |
176 | 172 |
177 } // namespace blink | 173 } // namespace blink |
178 | 174 |
179 #endif // WorkerThread_h | 175 #endif // WorkerThread_h |
OLD | NEW |