Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h

Issue 2622223002: Call MainThreadLoaderHolder::cancel as a pre-finalizer (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698