author | Tom Tung <shes050117@gmail.com> |
Fri, 08 Sep 2017 17:23:52 +0800 | |
changeset 379726 | 60499cc10fc4fc4dcab67c6696165bdfa30a4c7a |
parent 379725 | 01ccedeeaf8a52510aa493607a18617287910694 |
child 379727 | 83878b29466cfb4abb952019f9f32c402875913c |
push id | 32461 |
push user | kwierso@gmail.com |
push date | Fri, 08 Sep 2017 20:15:32 +0000 |
treeherder | mozilla-central@dd3736e98e4e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bkelly |
bugs | 1398043 |
milestone | 57.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
|
--- a/dom/cache/DBSchema.cpp +++ b/dom/cache/DBSchema.cpp @@ -2079,17 +2079,27 @@ ReadResponse(mozIStorageConnection* aCon aSavedResponseOut->mValue.principalInfo() = mozilla::ipc::ContentPrincipalInfo(attrs, void_t(), specNoSuffix); } bool nullPadding = false; rv = state->GetIsNull(6, &nullPadding); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } +#ifdef NIGHTLY_BUILD + bool shouldUpdateTo26 = false; + if (nullPadding && aSavedResponseOut->mValue.type() == ResponseType::Opaque) { + // XXXtt: This should be removed in the future (e.g. Nightly 58) by + // bug 1398167. + shouldUpdateTo26 = true; + aSavedResponseOut->mValue.paddingSize() = 0; + } else if (nullPadding) { +#else if (nullPadding) { +#endif // NIGHTLY_BUILD MOZ_DIAGNOSTIC_ASSERT(aSavedResponseOut->mValue.type() != ResponseType::Opaque); aSavedResponseOut->mValue.paddingSize() = InternalResponse::UNKNOWN_PADDING_SIZE; } else { MOZ_DIAGNOSTIC_ASSERT(aSavedResponseOut->mValue.type() == ResponseType::Opaque); int64_t paddingSize = 0; @@ -2098,16 +2108,30 @@ ReadResponse(mozIStorageConnection* aCon MOZ_DIAGNOSTIC_ASSERT(paddingSize >= 0); aSavedResponseOut->mValue.paddingSize() = paddingSize; } rv = state->GetBlobAsUTF8String(7, aSavedResponseOut->mValue.channelInfo().securityInfo()); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } +#ifdef NIGHTLY_BUILD + if (shouldUpdateTo26) { + // XXXtt: This is a quick fix for not updating properly in Nightly 57. + // Note: This should be removed in the future (e.g. Nightly 58) by + // bug 1398167. + rv = aConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING( + "UPDATE entries SET response_padding_size = 0 " + "WHERE response_type = 4 " // opaque response + "AND response_padding_size IS NULL" + )); + if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } + } +#endif // NIGHTLY_BUILD + rv = aConn->CreateStatement(NS_LITERAL_CSTRING( "SELECT " "name, " "value " "FROM response_headers " "WHERE entry_id=:entry_id;" ), getter_AddRefs(state)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }