Compare commits
196
Commits
master
...
RC_20250111
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
495b4980e7 | ||
|
|
ad480be112 | ||
|
|
a06001c022 | ||
|
|
6cbda74aeb | ||
|
|
576fbdf490 | ||
|
|
52b00c38ea | ||
|
|
8ec56f459b | ||
|
|
5cbe423461 | ||
|
|
369fbba750 | ||
|
|
8e3c35efc6 | ||
|
|
b3b852b877 | ||
|
|
d5c6e20e9e | ||
|
|
89b36775fb | ||
|
|
df16df5693 | ||
|
|
aa1fd576ac | ||
|
|
2512188ca7 | ||
|
|
89e88ca6a0 | ||
|
|
2697dd162f | ||
|
|
53a4179c4a | ||
|
|
a120731ddd | ||
|
|
bda611a41a | ||
|
|
5a02a4a1a4 | ||
|
|
e59f358b45 | ||
|
|
90c9535b39 | ||
|
|
ad778bbfdb | ||
|
|
8868552b24 | ||
|
|
66826eb487 | ||
|
|
39127b5ee9 | ||
|
|
80cff816a8 | ||
|
|
e9dda8dafa | ||
|
|
11fc818dfb | ||
|
|
84ed844e3f | ||
|
|
50af804f1c | ||
|
|
82ce93bce9 | ||
|
|
228abc8259 | ||
|
|
1692fa5291 | ||
|
|
bb58c6ae38 | ||
|
|
4f58dc27f9 | ||
|
|
fc5324b9f7 | ||
|
|
561f65aabf | ||
|
|
9acfe36b95 | ||
|
|
ce495cbd85 | ||
|
|
c44020f188 | ||
|
|
35e7a695af | ||
|
|
7a55055d22 | ||
|
|
061900b87f | ||
|
|
abe32f7309 | ||
|
|
7bfd4c7fe7 | ||
|
|
859d6a3e2c | ||
|
|
c2f05f99af | ||
|
|
55b33fb02b | ||
|
|
c247e40d41 | ||
|
|
05c58f159d | ||
|
|
67d5fefcf2 | ||
|
|
aad017be9e | ||
|
|
4543dbf3ff | ||
|
|
b1cb7e0a8f | ||
|
|
1c6d21c97d | ||
|
|
fc42fb38c9 | ||
|
|
618068c15b | ||
|
|
808516a0a8 | ||
|
|
7d6b806040 | ||
|
|
6b4e2c9d73 | ||
|
|
787883f6a4 | ||
|
|
7f02753c04 | ||
|
|
8fa38b3445 | ||
|
|
541c5f9f45 | ||
|
|
4b6bd4976a | ||
|
|
a0843d52b4 | ||
|
|
977a8cbed8 | ||
|
|
1e85085305 | ||
|
|
188f61505f | ||
|
|
a514d7f6a4 | ||
|
|
47c2c75ceb | ||
|
|
7082ec8a9a | ||
|
|
2907a84362 | ||
|
|
b8d1ee05c3 | ||
|
|
0b625e624a | ||
|
|
a4da712f91 | ||
|
|
185f124e87 | ||
|
|
8633077691 | ||
|
|
39a1899045 | ||
|
|
4dc011a187 | ||
|
|
ccb12e1dda | ||
|
|
63f0d3e295 | ||
|
|
09d598c496 | ||
|
|
7e60482d80 | ||
|
|
10b3237e52 | ||
|
|
99af7cc028 | ||
|
|
76b360b5d1 | ||
|
|
4001b58a3e | ||
|
|
134a8aac87 | ||
|
|
3e2e48872a | ||
|
|
622b43cbc5 | ||
|
|
75b44ef620 | ||
|
|
00084ea49c | ||
|
|
b6fae24296 | ||
|
|
13c6b7422d | ||
|
|
24f2e663cd | ||
|
|
f96b155988 | ||
|
|
d5cc24e916 | ||
|
|
8eba271c5f | ||
|
|
19955c82b3 | ||
|
|
80ae8aec7c | ||
|
|
d8441d7c81 | ||
|
|
c2446f2478 | ||
|
|
6efb7a1904 | ||
|
|
fa0b03a10f | ||
|
|
3ae2972950 | ||
|
|
2d48de9998 | ||
|
|
3b029cdfe4 | ||
|
|
ea9077a8a5 | ||
|
|
b4af6b6265 | ||
|
|
ae1d53ceb1 | ||
|
|
c3f4709d5e | ||
|
|
a7bb3fc175 | ||
|
|
6a0203f25f | ||
|
|
b0dfcb147f | ||
|
|
06fd4c9357 | ||
|
|
b9ea7fd9ee | ||
|
|
58308a5c7a | ||
|
|
88c7d54975 | ||
|
|
eadb5678b3 | ||
|
|
54e3e60796 | ||
|
|
2a05494abe | ||
|
|
bc89e58def | ||
|
|
3a009b97f6 | ||
|
|
a105f6d5e9 | ||
|
|
5db241c0c0 | ||
|
|
d38dca10e5 | ||
|
|
54fc723126 | ||
|
|
9b8ca17ee4 | ||
|
|
cddc95b39b | ||
|
|
5676529793 | ||
|
|
ce68156cf4 | ||
|
|
5032ad9593 | ||
|
|
b55f765f2e | ||
|
|
856078d435 | ||
|
|
c74c262d2f | ||
|
|
787e29e374 | ||
|
|
e439896c9b | ||
|
|
15b508f1fb | ||
|
|
5651ebfc76 | ||
|
|
593bfc1ce8 | ||
|
|
28953cda7a | ||
|
|
516f3f545d | ||
|
|
83aff65a42 | ||
|
|
5bd97df957 | ||
|
|
8772711181 | ||
|
|
dc9526f4c6 | ||
|
|
9ab36e7ae0 | ||
|
|
e8d30841e7 | ||
|
|
9faf29374e | ||
|
|
75e4818d36 | ||
|
|
a65144e9e0 | ||
|
|
4f29548526 | ||
|
|
528db2cbd8 | ||
|
|
84e6bcc1e6 | ||
|
|
0dc9ff518d | ||
|
|
a2e3bd44aa | ||
|
|
163a0e7caf | ||
|
|
49a86db5f3 | ||
|
|
2640953d8b | ||
|
|
7eb7d67f7a | ||
|
|
e28860ba7f | ||
|
|
49a96b1d91 | ||
|
|
3130812693 | ||
|
|
71ae69aea8 | ||
|
|
9e34d697c7 | ||
|
|
8fa9125d02 | ||
|
|
4b4488c3e4 | ||
|
|
248db7d301 | ||
|
|
e199f2949b | ||
|
|
456b5450a4 | ||
|
|
d8e629c4a3 | ||
|
|
4898c4f297 | ||
|
|
7cd578bbc6 | ||
|
|
1e91df628a | ||
|
|
b110549cbd | ||
|
|
971047835a | ||
|
|
dd4d9eb032 | ||
|
|
8b94f1e480 | ||
|
|
c89610a5c7 | ||
|
|
217963cbed | ||
|
|
c4f4e18340 | ||
|
|
8a7c0e7345 | ||
|
|
52e304d450 | ||
|
|
cfc0eeca53 | ||
|
|
ebd3dd9228 | ||
|
|
cb40e4e7ef | ||
|
|
662dba55fd | ||
|
|
8760ce023c | ||
|
|
b86e148bb7 | ||
|
|
9e83721e5e | ||
|
|
dc2d6c2e60 | ||
|
|
4ada6f6762 |
No files matched your search
@@ -1343,7 +1343,6 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
|
||||
static_cast<OffscreenCanvasCloneData*>(aContent);
|
||||
nsCOMPtr<nsIGlobalObject> parent = do_QueryInterface(mParent);
|
||||
RefPtr<OffscreenCanvas> canvas = OffscreenCanvas::CreateFromCloneData(parent, data);
|
||||
delete data;
|
||||
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
if (!GetOrCreateDOMReflector(aCx, canvas, &value)) {
|
||||
@@ -1351,6 +1350,7 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
|
||||
return false;
|
||||
}
|
||||
|
||||
delete data;
|
||||
aReturnObject.set(&value.toObject());
|
||||
return true;
|
||||
}
|
||||
@@ -1363,7 +1363,6 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
|
||||
static_cast<ImageBitmapCloneData*>(aContent);
|
||||
nsCOMPtr<nsIGlobalObject> parent = do_QueryInterface(mParent);
|
||||
RefPtr<ImageBitmap> bitmap = ImageBitmap::CreateFromCloneData(parent, data);
|
||||
delete data;
|
||||
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
if (!GetOrCreateDOMReflector(aCx, bitmap, &value)) {
|
||||
@@ -1371,6 +1370,7 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
|
||||
return false;
|
||||
}
|
||||
|
||||
delete data;
|
||||
aReturnObject.set(&value.toObject());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "nsHyphenationManager.h"
|
||||
#include "nsHyphenator.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/ScopeExit.h"
|
||||
|
||||
nsLineBreaker::nsLineBreaker()
|
||||
: mCurrentWordLanguage(nullptr),
|
||||
@@ -57,6 +58,14 @@ SetupCapitalization(const char16_t* aWord, uint32_t aLength,
|
||||
nsresult
|
||||
nsLineBreaker::FlushCurrentWord()
|
||||
{
|
||||
auto cleanup = mozilla::MakeScopeExit([&] {
|
||||
mCurrentWord.Clear();
|
||||
mTextItems.Clear();
|
||||
mCurrentWordContainsComplexChar = false;
|
||||
mCurrentWordContainsMixedLang = false;
|
||||
mCurrentWordLanguage = nullptr;
|
||||
});
|
||||
|
||||
uint32_t length = mCurrentWord.Length();
|
||||
AutoTArray<uint8_t,4000> breakState;
|
||||
if (!breakState.AppendElements(length))
|
||||
@@ -137,11 +146,6 @@ nsLineBreaker::FlushCurrentWord()
|
||||
offset += ti->mLength;
|
||||
}
|
||||
|
||||
mCurrentWord.Clear();
|
||||
mTextItems.Clear();
|
||||
mCurrentWordContainsComplexChar = false;
|
||||
mCurrentWordContainsMixedLang = false;
|
||||
mCurrentWordLanguage = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1437,6 +1437,11 @@ nsIOService::Observe(nsISupports *subject,
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch;
|
||||
GetPrefBranch(getter_AddRefs(prefBranch));
|
||||
PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF);
|
||||
|
||||
// Issue #2672 - Read cookie database at an early-as-possible time
|
||||
// off main thread. Hence, we have more chance to finish db query
|
||||
// before something calls into the cookie service.
|
||||
nsCOMPtr<nsISupports> cookieServ = do_GetService(NS_COOKIESERVICE_CONTRACTID);
|
||||
}
|
||||
} else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
// Remember we passed XPCOM shutdown notification to prevent any
|
||||
|
||||
+381
-584
File diff suppressed because it is too large.
Load diff
@@ -28,9 +28,12 @@
|
||||
#include "mozIStorageFunction.h"
|
||||
#include "nsIVariant.h"
|
||||
#include "nsIFile.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
using mozilla::NeckoOriginAttributes;
|
||||
using mozilla::OriginAttributes;
|
||||
@@ -43,6 +46,7 @@ class nsIObserverService;
|
||||
class nsIURI;
|
||||
class nsIChannel;
|
||||
class nsIArray;
|
||||
class nsIThread;
|
||||
class mozIStorageService;
|
||||
class mozIThirdPartyUtil;
|
||||
class ReadCookieDBListener;
|
||||
@@ -145,13 +149,49 @@ class nsCookieEntry : public nsCookieKey
|
||||
ArrayType mCookies;
|
||||
};
|
||||
|
||||
// struct for a constant cookie for threadsafe
|
||||
struct ConstCookie
|
||||
{
|
||||
ConstCookie(const nsCString& aName,
|
||||
const nsCString& aValue,
|
||||
const nsCString& aHost,
|
||||
const nsCString& aPath,
|
||||
int64_t aExpiry,
|
||||
int64_t aLastAccessed,
|
||||
int64_t aCreationTime,
|
||||
bool aIsSecure,
|
||||
bool aIsHttpOnly,
|
||||
const OriginAttributes &aOriginAttributes)
|
||||
: name(aName)
|
||||
, value(aValue)
|
||||
, host(aHost)
|
||||
, path(aPath)
|
||||
, expiry(aExpiry)
|
||||
, lastAccessed(aLastAccessed)
|
||||
, creationTime(aCreationTime)
|
||||
, isSecure(aIsSecure)
|
||||
, isHttpOnly(aIsHttpOnly)
|
||||
, originAttributes(aOriginAttributes)
|
||||
{
|
||||
}
|
||||
|
||||
const nsCString name;
|
||||
const nsCString value;
|
||||
const nsCString host;
|
||||
const nsCString path;
|
||||
const int64_t expiry;
|
||||
const int64_t lastAccessed;
|
||||
const int64_t creationTime;
|
||||
const bool isSecure;
|
||||
const bool isHttpOnly;
|
||||
const OriginAttributes originAttributes;
|
||||
};
|
||||
|
||||
// encapsulates a (key, nsCookie) tuple for temporary storage purposes.
|
||||
struct CookieDomainTuple
|
||||
{
|
||||
nsCookieKey key;
|
||||
RefPtr<nsCookie> cookie;
|
||||
|
||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
mozilla::UniquePtr<ConstCookie> cookie;
|
||||
};
|
||||
|
||||
// encapsulates in-memory and on-disk DB states, so we can
|
||||
@@ -194,17 +234,9 @@ public:
|
||||
// while the background read is taking place.
|
||||
nsCOMPtr<mozIStorageConnection> syncConn;
|
||||
nsCOMPtr<mozIStorageStatement> stmtReadDomain;
|
||||
nsCOMPtr<mozIStoragePendingStatement> pendingRead;
|
||||
// The asynchronous read listener. This is a weak ref (storage has ownership)
|
||||
// since it may need to outlive the DBState's database connection.
|
||||
ReadCookieDBListener* readListener;
|
||||
// An array of (baseDomain, cookie) tuples representing data read in
|
||||
// asynchronously. This is merged into hostTable once read is complete.
|
||||
nsTArray<CookieDomainTuple> hostArray;
|
||||
// A hashset of baseDomains read in synchronously, while the async read is
|
||||
// in flight. This is used to keep track of which data in hostArray is stale
|
||||
// when the time comes to merge.
|
||||
nsTHashtable<nsCookieKey> readSet;
|
||||
|
||||
// DB completion handlers.
|
||||
nsCOMPtr<mozIStorageStatementCallback> insertListener;
|
||||
@@ -266,6 +298,8 @@ class nsCookieService final : public nsICookieService
|
||||
void PrefChanged(nsIPrefBranch *aPrefBranch);
|
||||
void InitDBStates();
|
||||
OpenDBResult TryInitDB(bool aDeleteExistingDB);
|
||||
void InitDBConn();
|
||||
nsresult InitDBConnInternal();
|
||||
nsresult CreateTable();
|
||||
nsresult CreateTableForSchemaVersion6();
|
||||
nsresult CreateTableForSchemaVersion5();
|
||||
@@ -276,11 +310,8 @@ class nsCookieService final : public nsICookieService
|
||||
void HandleCorruptDB(DBState* aDBState);
|
||||
void RebuildCorruptDB(DBState* aDBState);
|
||||
OpenDBResult Read();
|
||||
template<class T> nsCookie* GetCookieFromRow(T &aRow, const OriginAttributes& aOriginAttributes);
|
||||
void AsyncReadComplete();
|
||||
void CancelAsyncRead(bool aPurgeReadSet);
|
||||
void EnsureReadDomain(const nsCookieKey &aKey);
|
||||
void EnsureReadComplete();
|
||||
mozilla::UniquePtr<ConstCookie> GetCookieFromRow(mozIStorageStatement *aRow, const OriginAttributes &aOriginAttributes);
|
||||
void EnsureReadComplete(bool aInitDBConn);
|
||||
nsresult NormalizeHost(nsCString &aHost);
|
||||
nsresult GetBaseDomain(nsIURI *aHostURI, nsCString &aBaseDomain, bool &aRequireHostMatch);
|
||||
nsresult GetBaseDomainFromHost(const nsACString &aHost, nsCString &aBaseDomain);
|
||||
@@ -351,6 +382,13 @@ class nsCookieService final : public nsICookieService
|
||||
uint16_t mMaxCookiesPerHost;
|
||||
int64_t mCookiePurgeAge;
|
||||
|
||||
// thread props
|
||||
nsCOMPtr<nsIThread> mThread;
|
||||
mozilla::Monitor mMonitor;
|
||||
mozilla::Atomic<bool> mInitializedDBStates;
|
||||
mozilla::Atomic<bool> mInitializedDBConn;
|
||||
nsTArray<CookieDomainTuple> mReadArray;
|
||||
|
||||
// friends!
|
||||
friend class DBListenerErrorHandler;
|
||||
friend class ReadCookieDBListener;
|
||||
|
||||
@@ -323,7 +323,8 @@ nsHttpConnection::StartSpdy(uint8_t spdyVersion)
|
||||
if (!mTLSFilter) {
|
||||
mTransaction = mSpdySession;
|
||||
} else {
|
||||
mTLSFilter->SetProxiedTransaction(mSpdySession);
|
||||
rv = mTLSFilter->SetProxiedTransaction(mSpdySession);
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
}
|
||||
if (mDontReuse) {
|
||||
mSpdySession->DontReuse();
|
||||
@@ -355,6 +356,7 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
|
||||
nsCOMPtr<nsISupports> securityInfo;
|
||||
nsCOMPtr<nsISSLSocketControl> ssl;
|
||||
nsAutoCString negotiatedNPN;
|
||||
nsAutoCString transactionNPN;
|
||||
|
||||
GetSecurityInfo(getter_AddRefs(securityInfo));
|
||||
if (!securityInfo) {
|
||||
@@ -373,6 +375,18 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
|
||||
}
|
||||
|
||||
rv = ssl->GetNegotiatedNPN(negotiatedNPN);
|
||||
|
||||
// Check if the connection NPN matches negotiated NPN.
|
||||
transactionNPN = mConnInfo->GetNPNToken();
|
||||
LOG(("negotiatedNPN: %s - transactionNPN: %s", negotiatedNPN.get(),
|
||||
transactionNPN.get()));
|
||||
if (!transactionNPN.IsEmpty() && negotiatedNPN != transactionNPN) {
|
||||
LOG(("Resetting connection due to mismatched NPN token"));
|
||||
DontReuse();
|
||||
mTransaction->Close(NS_ERROR_NET_RESET);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m0RTTChecked && (rv == NS_ERROR_NOT_CONNECTED) &&
|
||||
!mConnInfo->UsingProxy()) {
|
||||
// There is no ALPN info (yet!). We need to consider doing 0RTT. We
|
||||
|
||||
Reference in new issue
Block a user