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

Unified Diff: third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp b/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
index 3e61839f235ba316e2b59c3c733f6c997242151b..2cefdf6caa7f7adf9e3810355eefbdc0755d368b 100644
--- a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
+++ b/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp
@@ -18,21 +18,17 @@ namespace blink {
namespace {
template <typename T>
-class GlobalFetchImpl final : public GarbageCollectedFinalized<GlobalFetchImpl<T>>, public GlobalFetch::ScopedFetcher, public HeapSupplement<T> {
+class GlobalFetchImpl final : public GarbageCollectedFinalized<GlobalFetchImpl<T>>, public GlobalFetch::ScopedFetcher, public Supplement<T> {
USING_GARBAGE_COLLECTED_MIXIN(GlobalFetchImpl);
public:
static RawPtr<ScopedFetcher> from(T& supplementable, ExecutionContext* executionContext)
{
- GlobalFetchImpl* supplement = static_cast<GlobalFetchImpl*>(HeapSupplement<T>::from(supplementable, supplementName()));
+ GlobalFetchImpl* supplement = static_cast<GlobalFetchImpl*>(Supplement<T>::from(supplementable, supplementName()));
if (!supplement) {
supplement = new GlobalFetchImpl(executionContext);
- HeapSupplement<T>::provideTo(supplementable, supplementName(), supplement);
+ Supplement<T>::provideTo(supplementable, supplementName(), supplement);
}
-#if ENABLE(OILPAN)
return supplement;
-#else
- return supplement->m_weakFactory.createWeakPtr();
-#endif
}
ScriptPromise fetch(ScriptState* scriptState, const RequestInfo& input, const Dictionary& init, ExceptionState& exceptionState) override
@@ -55,23 +51,18 @@ public:
{
visitor->trace(m_fetchManager);
ScopedFetcher::trace(visitor);
- HeapSupplement<T>::trace(visitor);
+ Supplement<T>::trace(visitor);
}
private:
explicit GlobalFetchImpl(ExecutionContext* executionContext)
: m_fetchManager(FetchManager::create(executionContext))
-#if !ENABLE(OILPAN)
- , m_weakFactory(this)
-#endif
{
}
+
static const char* supplementName() { return "GlobalFetch"; }
Member<FetchManager> m_fetchManager;
-#if !ENABLE(OILPAN)
- WeakPtrFactory<ScopedFetcher> m_weakFactory;
-#endif
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698