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

Unified Diff: Source/platform/mhtml/ArchiveResource.cpp

Issue 374053002: Oilpan: move MHTML objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MHTMLArchive.h self-contained/closed. Created 6 years, 5 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/platform/mhtml/ArchiveResource.h ('k') | Source/platform/mhtml/ArchiveResourceCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mhtml/ArchiveResource.cpp
diff --git a/Source/platform/mhtml/ArchiveResource.cpp b/Source/platform/mhtml/ArchiveResource.cpp
index 46b899ec3e200446e1cc1fae2bed3bffbdce4a7a..0d783d812bb30933ec6a6cabcbe60e51a01fd305 100644
--- a/Source/platform/mhtml/ArchiveResource.cpp
+++ b/Source/platform/mhtml/ArchiveResource.cpp
@@ -42,19 +42,22 @@ inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KUR
ASSERT(m_data);
}
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const AtomicString& mimeType, const AtomicString& textEncoding, const String& frameName, const ResourceResponse& response)
+ArchiveResource::~ArchiveResource()
+{
+}
+
+PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const AtomicString& mimeType, const AtomicString& textEncoding, const String& frameName, const ResourceResponse& response)
{
if (!data)
return nullptr;
if (response.isNull()) {
- unsigned dataSize = data->size();
- return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName,
- ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
+ const ResourceResponse& resourceResponse = ResourceResponse(url, mimeType, data->size(), textEncoding, String());
+ return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textEncoding, frameName, resourceResponse));
}
- return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
+ return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
}
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
+PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
{
return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
}
« no previous file with comments | « Source/platform/mhtml/ArchiveResource.h ('k') | Source/platform/mhtml/ArchiveResourceCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698