Title: [272292] branches/safari-611-branch/Source/WebKit
- Revision
- 272292
- Author
- [email protected]
- Date
- 2021-02-02 17:42:16 -0800 (Tue, 02 Feb 2021)
Log Message
Cherry-pick r272229. rdar://problem/73907002
REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>
Reviewed by Alex Christensen.
If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-611-branch/Source/WebKit/ChangeLog (272291 => 272292)
--- branches/safari-611-branch/Source/WebKit/ChangeLog 2021-02-03 01:42:13 UTC (rev 272291)
+++ branches/safari-611-branch/Source/WebKit/ChangeLog 2021-02-03 01:42:16 UTC (rev 272292)
@@ -1,3 +1,46 @@
+2021-02-02 Russell Epstein <[email protected]>
+
+ Cherry-pick r272229. rdar://problem/73907002
+
+ REGRESSION(r271744): Broke Microsoft live login in internal builds
+ https://bugs.webkit.org/show_bug.cgi?id=221271
+ <rdar://problem/73848416>
+
+ Reviewed by Alex Christensen.
+
+ If a user goes straight to login.live.com without first visiting
+ microsoft.com, we crash when checking for storage access because
+ we assume the user has interacted with the page. Since this is a
+ quirked flow, we should not assume that, and should insert the
+ domain into the database.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-02 Kate Cheney <[email protected]>
+
+ REGRESSION(r271744): Broke Microsoft live login in internal builds
+ https://bugs.webkit.org/show_bug.cgi?id=221271
+ <rdar://problem/73848416>
+
+ Reviewed by Alex Christensen.
+
+ If a user goes straight to login.live.com without first visiting
+ microsoft.com, we crash when checking for storage access because
+ we assume the user has interacted with the page. Since this is a
+ quirked flow, we should not assume that, and should insert the
+ domain into the database.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+
2021-02-02 Alan Coon <[email protected]>
Cherry-pick r271813. rdar://problem/73888012
Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (272291 => 272292)
--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-02-03 01:42:13 UTC (rev 272291)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-02-03 01:42:16 UTC (rev 272292)
@@ -2118,12 +2118,18 @@
return CookieAccess::OnlyIfGranted;
}
-StorageAccessPromptWasShown ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt(unsigned requestingDomainID, const RegistrableDomain& firstPartyDomain) const
+StorageAccessPromptWasShown ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt(unsigned requestingDomainID, const RegistrableDomain& firstPartyDomain)
{
ASSERT(!RunLoop::isMain());
- auto firstPartyPrimaryDomainID = domainID(firstPartyDomain).value();
+ auto result = ensureResourceStatisticsForRegistrableDomain(firstPartyDomain);
+ if (!result.second) {
+ RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt was not completed due to failed insert attempt", this);
+ return StorageAccessPromptWasShown::No;
+ }
+ auto firstPartyPrimaryDomainID = *result.second;
+
SQLiteStatement statement(m_database, "SELECT COUNT(*) FROM StorageAccessUnderTopFrameDomains WHERE domainID = ? AND topLevelDomainID = ?");
if (statement.prepare() != SQLITE_OK
|| statement.bindInt(1, requestingDomainID) != SQLITE_OK
Modified: branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (272291 => 272292)
--- branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-02-03 01:42:13 UTC (rev 272291)
+++ branches/safari-611-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-02-03 01:42:16 UTC (rev 272292)
@@ -193,7 +193,7 @@
Vector<DomainData> domains() const;
bool hasHadUnexpiredRecentUserInteraction(const DomainData&, OperatingDatesWindow);
void clearGrandfathering(Vector<unsigned>&&);
- WebCore::StorageAccessPromptWasShown hasUserGrantedStorageAccessThroughPrompt(unsigned domainID, const RegistrableDomain&) const;
+ WebCore::StorageAccessPromptWasShown hasUserGrantedStorageAccessThroughPrompt(unsigned domainID, const RegistrableDomain&);
void incrementRecordsDeletedCountForDomains(HashSet<RegistrableDomain>&&) override;
void reclassifyResources();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes