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

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

Issue 1847823007: Hide PingLoader lifetime implementation detail from outside view. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/PingLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/BeaconLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/BeaconLoader.cpp b/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
index 077f05d54581a85ec9c6c46065d3535e8374650b..8e33dfe9cf6e86275dd5ec16590d75926ddc526a 100644
--- a/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
@@ -97,9 +97,9 @@ public:
FetchInitiatorInfo initiatorInfo;
initiatorInfo.name = FetchInitiatorTypeNames::beacon;
- // Leak the loader, since it will kill itself as soon as it receives a response.
- RawPtr<BeaconLoader> loader = new BeaconLoader(frame, request, initiatorInfo, AllowStoredCredentials);
- loader->ref();
+ // The loader keeps itself alive until it receives a response and disposes itself.
+ BeaconLoader* loader = new BeaconLoader(frame, request, initiatorInfo, AllowStoredCredentials);
+ ASSERT_UNUSED(loader, loader);
return true;
}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/PingLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698