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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.h

Issue 2625823003: Reset ResourceLoader::m_loader in the 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 | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | 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) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class ResourceError; 44 class ResourceError;
45 class ResourceFetcher; 45 class ResourceFetcher;
46 46
47 // A ResourceLoader is created for each Resource by the ResourceFetcher when it 47 // A ResourceLoader is created for each Resource by the ResourceFetcher when it
48 // needs to load the specified resource. A ResourceLoader creates a 48 // needs to load the specified resource. A ResourceLoader creates a
49 // WebURLLoader and loads the resource using it. Any per-load logic should be 49 // WebURLLoader and loads the resource using it. Any per-load logic should be
50 // implemented in this class basically. 50 // implemented in this class basically.
51 class CORE_EXPORT ResourceLoader final 51 class CORE_EXPORT ResourceLoader final
52 : public GarbageCollectedFinalized<ResourceLoader>, 52 : public GarbageCollectedFinalized<ResourceLoader>,
53 protected WebURLLoaderClient { 53 protected WebURLLoaderClient {
54 USING_PRE_FINALIZER(ResourceLoader, dispose);
55
54 public: 56 public:
55 static ResourceLoader* create(ResourceFetcher*, Resource*); 57 static ResourceLoader* create(ResourceFetcher*, Resource*);
56 ~ResourceLoader() override; 58 ~ResourceLoader() override;
57 DECLARE_TRACE(); 59 DECLARE_TRACE();
58 60
59 void start(const ResourceRequest&); 61 void start(const ResourceRequest&);
60 62
61 void cancel(); 63 void cancel();
62 64
63 void setDefersLoading(bool); 65 void setDefersLoading(bool);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // ResourceLoader state. 116 // ResourceLoader state.
115 void restart(const ResourceRequest&); 117 void restart(const ResourceRequest&);
116 118
117 FetchContext& context() const; 119 FetchContext& context() const;
118 ResourceRequestBlockedReason canAccessResponse(Resource*, 120 ResourceRequestBlockedReason canAccessResponse(Resource*,
119 const ResourceResponse&) const; 121 const ResourceResponse&) const;
120 122
121 void cancelForRedirectAccessCheckError(const KURL&, 123 void cancelForRedirectAccessCheckError(const KURL&,
122 ResourceRequestBlockedReason); 124 ResourceRequestBlockedReason);
123 void requestSynchronously(const ResourceRequest&); 125 void requestSynchronously(const ResourceRequest&);
126 void dispose();
124 127
125 std::unique_ptr<WebURLLoader> m_loader; 128 std::unique_ptr<WebURLLoader> m_loader;
126 Member<ResourceFetcher> m_fetcher; 129 Member<ResourceFetcher> m_fetcher;
127 Member<Resource> m_resource; 130 Member<Resource> m_resource;
128 bool m_isCacheAwareLoadingActivated; 131 bool m_isCacheAwareLoadingActivated;
129 }; 132 };
130 133
131 } // namespace blink 134 } // namespace blink
132 135
133 #endif 136 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698