author | Marco Bonardo <mbonardo@mozilla.com> |
Tue, 26 Jun 2018 13:50:57 +0200 | |
changeset 423821 | bd92ec274e3934bc11948d4a81f05cd7801d7cdb |
parent 423820 | 12a849d78301b32f4d800dfe50944fc6f4f810b4 |
child 423822 | 79aabc0f2db2fa8e6c248502aa901efb4ffafe44 |
push id | 65612 |
push user | mak77@bonardo.net |
push date | Wed, 27 Jun 2018 09:25:29 +0000 |
treeherder | autoland@bd92ec274e39 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | asuth |
bugs | 1470961 |
milestone | 63.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
netwerk/cache/nsDiskCacheDeviceSQL.cpp | file | annotate | diff | comparison | revisions | |
storage/mozStorageConnection.cpp | file | annotate | diff | comparison | revisions |
--- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -43,17 +43,16 @@ #include "mozIStorageFunction.h" #include "mozStorageHelper.h" #include "nsICacheVisitor.h" #include "nsISeekableStream.h" #include "mozilla/Telemetry.h" -#include "sqlite3.h" #include "mozilla/storage.h" #include "nsVariant.h" #include "mozilla/BasePrincipal.h" using namespace mozilla; using namespace mozilla::storage; using mozilla::OriginAttributes; @@ -213,17 +212,19 @@ nsOfflineCacheEvictionFunction::OnFuncti const char *key = values->AsSharedUTF8String(1, &valueLen); nsAutoCString fullKey(clientID); fullKey.Append(':'); fullKey.Append(key); int generation = values->AsInt32(2); // If the key is currently locked, refuse to delete this row. if (mDevice->IsLocked(fullKey)) { - NS_ADDREF(*_retval = new IntegerVariant(SQLITE_IGNORE)); + // This code thought it was performing the equivalent of invoking the SQL + // "RAISE(IGNORE)" function. It was not. Please see bug 1470961 and any + // follow-ups to understand the plan for correcting this bug. return NS_OK; } nsCOMPtr<nsIFile> file; rv = GetCacheDataFile(mDevice->CacheDirectory(), key, generation, file); if (NS_FAILED(rv)) {
--- a/storage/mozStorageConnection.cpp +++ b/storage/mozStorageConnection.cpp @@ -255,19 +255,17 @@ basicFunctionHelper(sqlite3_context *aCt NS_WARNING(errorMessage.get()); ::sqlite3_result_error(aCtx, errorMessage.get(), -1); ::sqlite3_result_error_code(aCtx, nsresultToSQLiteResult(rv)); return; } int retcode = variantToSQLiteT(aCtx, result); - if (retcode == SQLITE_IGNORE) { - ::sqlite3_result_int(aCtx, SQLITE_IGNORE); - } else if (retcode != SQLITE_OK) { + if (retcode != SQLITE_OK) { NS_WARNING("User function returned invalid data type!"); ::sqlite3_result_error(aCtx, "User function returned invalid data type", -1); } } void