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

Unified Diff: third_party/WebKit/Source/core/page/NetworkStateNotifier.h

Issue 1409853007: Have NetworkStateNotifier keep untraced ExecutionContext observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/NetworkStateNotifier.h
diff --git a/third_party/WebKit/Source/core/page/NetworkStateNotifier.h b/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
index 1e0b7b12c70db50d29ff7d6b9d3c25ff24b337cf..91b62a0ae4c6622a43f08c9cc7767edd958eb781 100644
--- a/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
+++ b/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
@@ -108,7 +108,10 @@ private:
void setWebConnectionImpl(WebConnectionType, double maxBandwidthMbps);
void setMaxBandwidthImpl(double maxBandwidthMbps);
- using ObserverListMap = WillBePersistentHeapHashMap<RawPtrWillBeWeakMember<ExecutionContext>, OwnPtr<ObserverList>>;
+ // The ObserverListMap is cross-thread accessed, adding/removing Observers running
+ // within an ExecutionContext. Kept off-heap to ease cross-thread allocation and use;
+ // the observers are (already) responsible for explicitly unregistering while finalizing.
+ using ObserverListMap = HashMap<RawPtrWillBeUntracedMember<ExecutionContext>, OwnPtr<ObserverList>>;
void notifyObserversOfConnectionChangeOnContext(WebConnectionType, double maxBandwidthMbps, ExecutionContext*);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698