mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1130452 - Remove support for the prefixMatch option in the service worker cache code; r=bkelly,baku
This commit is contained in:
parent
1c6f45d117
commit
f3ede7f37e
18
dom/cache/DBSchema.cpp
vendored
18
dom/cache/DBSchema.cpp
vendored
@ -339,7 +339,7 @@ DBSchema::CachePut(mozIStorageConnection* aConn, CacheId aCacheId,
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(aConn);
|
||||
|
||||
PCacheQueryParams params(false, false, false, false, false,
|
||||
PCacheQueryParams params(false, false, false, false,
|
||||
NS_LITERAL_STRING(""));
|
||||
nsAutoTArray<EntryId, 256> matches;
|
||||
nsresult rv = QueryCache(aConn, aCacheId, aRequest, params, matches);
|
||||
@ -675,13 +675,7 @@ DBSchema::QueryCache(mozIStorageConnection* aConn, CacheId aCacheId,
|
||||
query.AppendLiteral("request_url");
|
||||
}
|
||||
|
||||
if (aParams.prefixMatch()) {
|
||||
query.AppendLiteral(" LIKE ?2 ESCAPE '\\'");
|
||||
} else {
|
||||
query.AppendLiteral("=?2");
|
||||
}
|
||||
|
||||
query.AppendLiteral(" GROUP BY entries.id ORDER BY entries.id;");
|
||||
query.AppendLiteral("=?2 GROUP BY entries.id ORDER BY entries.id;");
|
||||
|
||||
nsCOMPtr<mozIStorageStatement> state;
|
||||
nsresult rv = aConn->CreateStatement(query, getter_AddRefs(state));
|
||||
@ -690,14 +684,6 @@ DBSchema::QueryCache(mozIStorageConnection* aConn, CacheId aCacheId,
|
||||
rv = state->BindInt32Parameter(0, aCacheId);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
|
||||
if (aParams.prefixMatch()) {
|
||||
nsAutoString escapedUrlToMatch;
|
||||
rv = state->EscapeStringForLIKE(urlToMatch, '\\', escapedUrlToMatch);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
urlToMatch = escapedUrlToMatch;
|
||||
urlToMatch.AppendLiteral("%");
|
||||
}
|
||||
|
||||
rv = state->BindStringParameter(1, urlToMatch);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
|
||||
|
1
dom/cache/PCacheTypes.ipdlh
vendored
1
dom/cache/PCacheTypes.ipdlh
vendored
@ -22,7 +22,6 @@ struct PCacheQueryParams
|
||||
bool ignoreSearch;
|
||||
bool ignoreMethod;
|
||||
bool ignoreVary;
|
||||
bool prefixMatch;
|
||||
bool cacheNameSet;
|
||||
nsString cacheName;
|
||||
};
|
||||
|
1
dom/cache/TypeUtils.cpp
vendored
1
dom/cache/TypeUtils.cpp
vendored
@ -266,7 +266,6 @@ TypeUtils::ToPCacheQueryParams(PCacheQueryParams& aOut,
|
||||
aOut.ignoreSearch() = aIn.mIgnoreSearch;
|
||||
aOut.ignoreMethod() = aIn.mIgnoreMethod;
|
||||
aOut.ignoreVary() = aIn.mIgnoreVary;
|
||||
aOut.prefixMatch() = aIn.mPrefixMatch;
|
||||
aOut.cacheNameSet() = aIn.mCacheName.WasPassed();
|
||||
if (aOut.cacheNameSet()) {
|
||||
aOut.cacheName() = aIn.mCacheName.Value();
|
||||
|
@ -33,7 +33,6 @@ dictionary CacheQueryOptions {
|
||||
boolean ignoreSearch = false;
|
||||
boolean ignoreMethod = false;
|
||||
boolean ignoreVary = false;
|
||||
boolean prefixMatch = false;
|
||||
DOMString cacheName;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user