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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2436623004: [Fetch, Loader] Expect on-heap objects will never get destroyed with a reference (Closed)
Patch Set: fix Created 4 years, 2 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/core/loader/DocumentThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index 74c57a434ad54417170b45faa936d222381da3fe..f7f1622aab03358c717827a354bdc4b488b71504 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -647,7 +647,6 @@ bool DocumentThreadableLoader::redirectReceived(
for (const auto& header : m_simpleRequestHeaders)
crossOriginRequest.setHTTPHeaderField(header.key, header.value);
makeCrossOriginAccessRequest(crossOriginRequest);
- // |this| may be dead here.
return false;
}
@@ -963,14 +962,9 @@ void DocumentThreadableLoader::handlePreflightFailure(
}
void DocumentThreadableLoader::handleError(const ResourceError& error) {
- // Copy the ResourceError instance to make it sure that the passed
- // ResourceError is alive during didFail() even when the Resource is
- // destructed during didFail().
- ResourceError copiedError = error;
-
ThreadableLoaderClient* client = m_client;
clear();
- client->didFail(copiedError);
+ client->didFail(error);
}
void DocumentThreadableLoader::loadRequestAsync(

Powered by Google App Engine
This is Rietveld 408576698