diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp index 03da25a3844..6acf83e19dc 100644 --- a/dom/cache/DBSchema.cpp +++ b/dom/cache/DBSchema.cpp @@ -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 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 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; } diff --git a/dom/cache/PCacheTypes.ipdlh b/dom/cache/PCacheTypes.ipdlh index 03a6b6e6330..d56ca86e647 100644 --- a/dom/cache/PCacheTypes.ipdlh +++ b/dom/cache/PCacheTypes.ipdlh @@ -22,7 +22,6 @@ struct PCacheQueryParams bool ignoreSearch; bool ignoreMethod; bool ignoreVary; - bool prefixMatch; bool cacheNameSet; nsString cacheName; }; diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index ff8d9ad34b6..05e6e5a0ec7 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -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(); diff --git a/dom/webidl/Cache.webidl b/dom/webidl/Cache.webidl index 099701d2bdc..7df69a8f6e0 100644 --- a/dom/webidl/Cache.webidl +++ b/dom/webidl/Cache.webidl @@ -33,7 +33,6 @@ dictionary CacheQueryOptions { boolean ignoreSearch = false; boolean ignoreMethod = false; boolean ignoreVary = false; -boolean prefixMatch = false; DOMString cacheName; };