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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) OVERRIDE; | 79 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) OVERRIDE; |
80 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) O
VERRIDE; | 80 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) O
VERRIDE; |
81 | 81 |
82 void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>); | 82 void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>); |
83 | 83 |
84 protected: | 84 protected: |
85 virtual ~WorkerMessagingProxy(); | 85 virtual ~WorkerMessagingProxy(); |
86 | 86 |
87 private: | 87 private: |
88 static void workerObjectDestroyedInternal(ExecutionContext*, WorkerMessaging
Proxy*); | 88 static void workerObjectDestroyedInternal(ExecutionContext*, WorkerMessaging
Proxy*); |
| 89 void terminateInternally(); |
89 | 90 |
90 RefPtrWillBePersistent<ExecutionContext> m_executionContext; | 91 RefPtrWillBePersistent<ExecutionContext> m_executionContext; |
91 OwnPtr<WorkerObjectProxy> m_workerObjectProxy; | 92 OwnPtr<WorkerObjectProxy> m_workerObjectProxy; |
92 Worker* m_workerObject; | 93 Worker* m_workerObject; |
93 bool m_mayBeDestroyed; | 94 bool m_mayBeDestroyed; |
94 RefPtr<DedicatedWorkerThread> m_workerThread; | 95 RefPtr<DedicatedWorkerThread> m_workerThread; |
95 | 96 |
96 unsigned m_unconfirmedMessageCount; // Unconfirmed messages from worker obje
ct to worker thread. | 97 unsigned m_unconfirmedMessageCount; // Unconfirmed messages from worker obje
ct to worker thread. |
97 bool m_workerThreadHadPendingActivity; // The latest confirmation from worke
r thread reported that it was still active. | 98 bool m_workerThreadHadPendingActivity; // The latest confirmation from worke
r thread reported that it was still active. |
98 | 99 |
99 bool m_askedToTerminate; | 100 bool m_askedToTerminate; |
100 | 101 |
101 Vector<OwnPtr<ExecutionContextTask> > m_queuedEarlyTasks; // Tasks are queue
d here until there's a thread object created. | 102 Vector<OwnPtr<ExecutionContextTask> > m_queuedEarlyTasks; // Tasks are queue
d here until there's a thread object created. |
102 WorkerGlobalScopeProxy::PageInspector* m_pageInspector; | 103 WorkerGlobalScopeProxy::PageInspector* m_pageInspector; |
103 | 104 |
104 OwnPtrWillBePersistent<WorkerClients> m_workerClients; | 105 OwnPtrWillBePersistent<WorkerClients> m_workerClients; |
105 }; | 106 }; |
106 | 107 |
107 } // namespace blink | 108 } // namespace blink |
108 | 109 |
109 #endif // WorkerMessagingProxy_h | 110 #endif // WorkerMessagingProxy_h |
OLD | NEW |