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

Unified Diff: third_party/WebKit/Source/core/inspector/NetworkResourcesData.h

Issue 1436793002: Oilpan: move NetworkResourcesData to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: non-oilpan compile fix Created 5 years, 1 month 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/inspector/NetworkResourcesData.h
diff --git a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
index 404fc326ffb758dbac03110476d7eaeafce344ad..3f2a4fb178447dfd316bcfb585e073d333751b6a 100644
--- a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
+++ b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
@@ -78,11 +78,11 @@ private:
bool m_includeCredentials;
};
-class NetworkResourcesData {
- USING_FAST_MALLOC(NetworkResourcesData);
+class NetworkResourcesData final : public NoBaseWillBeGarbageCollectedFinalized<NetworkResourcesData> {
+ USING_FAST_MALLOC_WILL_BE_REMOVED(NetworkResourcesData);
public:
- class ResourceData {
- USING_FAST_MALLOC(ResourceData);
+ class ResourceData final : public NoBaseWillBeGarbageCollectedFinalized<ResourceData> {
+ USING_FAST_MALLOC_WILL_BE_REMOVED(ResourceData);
friend class NetworkResourcesData;
public:
ResourceData(const String& requestId, const String& loaderId);
@@ -133,6 +133,7 @@ public:
BlobDataHandle* downloadedFileBlob() const { return m_downloadedFileBlob.get(); }
void setDownloadedFileBlob(PassRefPtr<BlobDataHandle> blob) { m_downloadedFileBlob = blob; }
+ DECLARE_TRACE();
private:
bool hasData() const { return m_dataBuffer; }
size_t dataLength() const;
@@ -144,7 +145,7 @@ public:
String m_frameId;
KURL m_url;
String m_content;
- RefPtrWillBePersistent<XHRReplayData> m_xhrReplayData;
+ RefPtrWillBeMember<XHRReplayData> m_xhrReplayData;
bool m_base64Encoded;
RefPtr<SharedBuffer> m_dataBuffer;
bool m_isContentEvicted;
@@ -156,12 +157,14 @@ public:
OwnPtr<TextResourceDecoder> m_decoder;
RefPtr<SharedBuffer> m_buffer;
- Resource* m_cachedResource;
+ RawPtrWillBeMember<Resource> m_cachedResource;
RefPtr<BlobDataHandle> m_downloadedFileBlob;
};
- NetworkResourcesData();
-
+ static PassOwnPtrWillBeRawPtr<NetworkResourcesData> create()
+ {
+ return adoptPtrWillBeNoop(new NetworkResourcesData);
+ }
~NetworkResourcesData();
void resourceCreated(const String& requestId, const String& loaderId);
@@ -179,9 +182,12 @@ public:
void setResourcesDataSizeLimits(size_t maximumResourcesContentSize, size_t maximumSingleResourceContentSize);
void setXHRReplayData(const String& requestId, XHRReplayData*);
XHRReplayData* xhrReplayData(const String& requestId);
- Vector<ResourceData*> resources();
+ WillBeHeapVector<RawPtrWillBeMember<ResourceData>> resources();
+ DECLARE_TRACE();
private:
+ NetworkResourcesData();
+
ResourceData* resourceDataForRequestId(const String& requestId);
void ensureNoDataForRequestId(const String& requestId);
bool ensureFreeSpace(size_t);
@@ -190,7 +196,7 @@ private:
typedef HashMap<String, String> ReusedRequestIds;
ReusedRequestIds m_reusedXHRReplayDataRequestIds;
- typedef HashMap<String, ResourceData*> ResourceDataMap;
+ typedef WillBeHeapHashMap<String, RawPtrWillBeMember<ResourceData>> ResourceDataMap;
ResourceDataMap m_requestIdToResourceDataMap;
size_t m_contentSize;
size_t m_maximumResourcesContentSize;

Powered by Google App Engine
This is Rietveld 408576698