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

Unified Diff: Source/modules/fetch/FetchManager.cpp

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 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
« no previous file with comments | « Source/modules/fetch/Body.cpp ('k') | Source/modules/geofencing/Geofencing.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/FetchManager.cpp
diff --git a/Source/modules/fetch/FetchManager.cpp b/Source/modules/fetch/FetchManager.cpp
index 31708d9515b470bc4abc7b4a0d6074dec36a4da2..634370cc1daf4525dcf6ac9b0528a77a25634745 100644
--- a/Source/modules/fetch/FetchManager.cpp
+++ b/Source/modules/fetch/FetchManager.cpp
@@ -40,7 +40,7 @@ namespace blink {
class FetchManager::Loader final : public NoBaseWillBeGarbageCollectedFinalized<FetchManager::Loader>, public ThreadableLoaderClient, public ContextLifecycleObserver {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FetchManager::Loader);
public:
- static PassOwnPtrWillBeRawPtr<Loader> create(ExecutionContext* executionContext, FetchManager* fetchManager, PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, FetchRequestData* request)
+ static PassOwnPtrWillBeRawPtr<Loader> create(ExecutionContext* executionContext, FetchManager* fetchManager, ScriptPromiseResolver* resolver, FetchRequestData* request)
{
return adoptPtrWillBeNoop(new Loader(executionContext, fetchManager, resolver, request));
}
@@ -58,7 +58,7 @@ public:
void dispose();
private:
- Loader(ExecutionContext*, FetchManager*, PassRefPtrWillBeRawPtr<ScriptPromiseResolver>, FetchRequestData*);
+ Loader(ExecutionContext*, FetchManager*, ScriptPromiseResolver*, FetchRequestData*);
void performBasicFetch();
void performNetworkError(const String& message);
@@ -68,7 +68,7 @@ private:
Document* document() const;
RawPtrWillBeMember<FetchManager> m_fetchManager;
- RefPtrWillBeMember<ScriptPromiseResolver> m_resolver;
+ PersistentWillBeMember<ScriptPromiseResolver> m_resolver;
PersistentWillBeMember<FetchRequestData> m_request;
RefPtr<ThreadableLoader> m_loader;
bool m_failed;
@@ -76,7 +76,7 @@ private:
int m_responseHttpStatusCode;
};
-FetchManager::Loader::Loader(ExecutionContext* executionContext, FetchManager* fetchManager, PassRefPtrWillBeRawPtr<ScriptPromiseResolver> resolver, FetchRequestData* request)
+FetchManager::Loader::Loader(ExecutionContext* executionContext, FetchManager* fetchManager, ScriptPromiseResolver* resolver, FetchRequestData* request)
: ContextLifecycleObserver(executionContext)
, m_fetchManager(fetchManager)
, m_resolver(resolver)
@@ -428,12 +428,12 @@ FetchManager::~FetchManager()
ScriptPromise FetchManager::fetch(ScriptState* scriptState, FetchRequestData* request)
{
- RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
request->setContext(WebURLRequest::RequestContextFetch);
- OwnPtrWillBeRawPtr<Loader> ownLoader = Loader::create(m_executionContext, this, resolver.release(), request);
+ OwnPtrWillBeRawPtr<Loader> ownLoader = Loader::create(m_executionContext, this, resolver, request);
Loader* loader = m_loaders.add(ownLoader.release()).storedValue->get();
loader->start();
return promise;
« no previous file with comments | « Source/modules/fetch/Body.cpp ('k') | Source/modules/geofencing/Geofencing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698