OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 // An instance of this class lives in the main thread. It is a | 131 // An instance of this class lives in the main thread. It is a |
132 // ThreadableLoaderClient for a DocumentThreadableLoader and forward | 132 // ThreadableLoaderClient for a DocumentThreadableLoader and forward |
133 // notifications to the associated WorkerThreadableLoader living in the | 133 // notifications to the associated WorkerThreadableLoader living in the |
134 // worker thread. | 134 // worker thread. |
135 class MainThreadLoaderHolder final | 135 class MainThreadLoaderHolder final |
136 : public GarbageCollectedFinalized<MainThreadLoaderHolder>, | 136 : public GarbageCollectedFinalized<MainThreadLoaderHolder>, |
137 public ThreadableLoaderClient, | 137 public ThreadableLoaderClient, |
138 public WorkerThreadLifecycleObserver { | 138 public WorkerThreadLifecycleObserver { |
139 USING_GARBAGE_COLLECTED_MIXIN(MainThreadLoaderHolder); | 139 USING_GARBAGE_COLLECTED_MIXIN(MainThreadLoaderHolder); |
| 140 USING_PRE_FINALIZER(MainThreadLoaderHolder, cancel); |
140 | 141 |
141 public: | 142 public: |
142 static void createAndStart(WorkerThreadableLoader*, | 143 static void createAndStart(WorkerThreadableLoader*, |
143 PassRefPtr<WorkerLoaderProxy>, | 144 PassRefPtr<WorkerLoaderProxy>, |
144 WorkerThreadLifecycleContext*, | 145 WorkerThreadLifecycleContext*, |
145 std::unique_ptr<CrossThreadResourceRequestData>, | 146 std::unique_ptr<CrossThreadResourceRequestData>, |
146 const ThreadableLoaderOptions&, | 147 const ThreadableLoaderOptions&, |
147 const ResourceLoaderOptions&, | 148 const ResourceLoaderOptions&, |
148 PassRefPtr<WaitableEventWithTasks>, | 149 PassRefPtr<WaitableEventWithTasks>, |
149 ExecutionContext*); | 150 ExecutionContext*); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ResourceLoaderOptions m_resourceLoaderOptions; | 217 ResourceLoaderOptions m_resourceLoaderOptions; |
217 BlockingBehavior m_blockingBehavior; | 218 BlockingBehavior m_blockingBehavior; |
218 | 219 |
219 // |*m_mainThreadLoaderHolder| lives in the main thread. | 220 // |*m_mainThreadLoaderHolder| lives in the main thread. |
220 CrossThreadPersistent<MainThreadLoaderHolder> m_mainThreadLoaderHolder; | 221 CrossThreadPersistent<MainThreadLoaderHolder> m_mainThreadLoaderHolder; |
221 }; | 222 }; |
222 | 223 |
223 } // namespace blink | 224 } // namespace blink |
224 | 225 |
225 #endif // WorkerThreadableLoader_h | 226 #endif // WorkerThreadableLoader_h |
OLD | NEW |