| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 Document& document() const; | 159 Document& document() const; |
| 160 ServiceWorkerGlobalScope* workerGlobalScope() const; | 160 ServiceWorkerGlobalScope* workerGlobalScope() const; |
| 161 | 161 |
| 162 // Non-null until the WebEmbeddedWorkerImpl explicitly detach()es | 162 // Non-null until the WebEmbeddedWorkerImpl explicitly detach()es |
| 163 // as part of its finalization. | 163 // as part of its finalization. |
| 164 WebEmbeddedWorkerImpl* m_embeddedWorker; | 164 WebEmbeddedWorkerImpl* m_embeddedWorker; |
| 165 Member<Document> m_document; | 165 Member<Document> m_document; |
| 166 | 166 |
| 167 Member<ParentFrameTaskRunners> m_parentFrameTaskRunners; | 167 Member<ParentFrameTaskRunners> m_parentFrameTaskRunners; |
| 168 | 168 |
| 169 HeapHashMap<int, Member<FetchEvent>> m_pendingPreloadFetchEvents; | 169 // The worker thread uses this map to track |FetchEvent|s created |
| 170 // on the worker thread (heap.) But as the proxy object is created |
| 171 // on the main thread & its heap, we must use a cross-heap reference |
| 172 // to each |FetchEvent| so as to obey the "per-thread heap rule" that |
| 173 // a heap should only have per-thread heap references. Keeping a |
| 174 // cross-heap reference requires the use of a CrossThreadPersistent<> |
| 175 // to remain safe and sound. |
| 176 // |
| 177 HashMap<int, CrossThreadPersistent<FetchEvent>> m_pendingPreloadFetchEvents; |
| 170 | 178 |
| 171 WebServiceWorkerContextClient* m_client; | 179 WebServiceWorkerContextClient* m_client; |
| 172 | 180 |
| 173 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope; | 181 CrossThreadPersistent<ServiceWorkerGlobalScope> m_workerGlobalScope; |
| 174 }; | 182 }; |
| 175 | 183 |
| 176 } // namespace blink | 184 } // namespace blink |
| 177 | 185 |
| 178 #endif // ServiceWorkerGlobalScopeProxy_h | 186 #endif // ServiceWorkerGlobalScopeProxy_h |
| OLD | NEW |