Index: third_party/WebKit/Source/modules/storage/StorageArea.cpp |
diff --git a/third_party/WebKit/Source/modules/storage/StorageArea.cpp b/third_party/WebKit/Source/modules/storage/StorageArea.cpp |
index e8b98b800b482c5bc9549d023398e902cf869ba4..35e82b6892ea2475ad77daf42a0eb655cfaf743e 100644 |
--- a/third_party/WebKit/Source/modules/storage/StorageArea.cpp |
+++ b/third_party/WebKit/Source/modules/storage/StorageArea.cpp |
@@ -161,9 +161,8 @@ size_t StorageArea::memoryBytesUsedByCache() |
void StorageArea::dispatchLocalStorageEvent(const String& key, const String& oldValue, const String& newValue, SecurityOrigin* securityOrigin, const KURL& pageURL, WebStorageArea* sourceAreaInstance, bool originatedInProcess) |
{ |
- // FIXME: This looks suspicious. Why doesn't this use allPages instead? |
- const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); |
- for (Page* page : pages) { |
+ // Iterate over all pages that have a StorageNamespaceController supplement. |
+ for (Page* page : Page::ordinaryPages()) { |
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) { |
// FIXME: We do not yet have a way to dispatch events to out-of-process frames. |
if (!frame->isLocalFrame()) |
@@ -181,9 +180,8 @@ void StorageArea::dispatchLocalStorageEvent(const String& key, const String& old |
static Page* findPageWithSessionStorageNamespace(const WebStorageNamespace& sessionNamespace) |
{ |
- // FIXME: This looks suspicious. Why doesn't this use allPages instead? |
- const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); |
- for (Page* page : pages) { |
+ // Iterate over all pages that have a StorageNamespaceController supplement. |
+ for (Page* page : Page::ordinaryPages()) { |
const bool dontCreateIfMissing = false; |
StorageNamespace* storageNamespace = StorageNamespaceController::from(page)->sessionStorage(dontCreateIfMissing); |
if (storageNamespace && storageNamespace->isSameNamespace(sessionNamespace)) |