mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of reformatting the entire tree over the comments would be minimal. I've used a combination of strategies including disabling of formatting, some manual formatting and some changes to formatting to work around some clang-format limitations. Differential Revision: https://phabricator.services.mozilla.com/D13371 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6ae5fdab0a
commit
490e611801
@ -276,7 +276,8 @@ public:
|
||||
* @param aItem Item of interest
|
||||
* @param aZip Archive
|
||||
* @param aBuf Buffer used for decompression.
|
||||
* This determines the maximum Read() size in the compressed case.
|
||||
* This determines the maximum Read() size in the
|
||||
* compressed case.
|
||||
* @param aBufSize Buffer size
|
||||
* @param doCRC When set to true Read() will check crc
|
||||
*/
|
||||
|
@ -44,7 +44,8 @@
|
||||
* 1. Write a long jump to our interceptor function into the five bytes of NOPs
|
||||
* before the function.
|
||||
*
|
||||
* 2. Write a short jump -5 into the two-byte nop at the beginning of the function.
|
||||
* 2. Write a short jump -5 into the two-byte nop at the beginning of the
|
||||
* function.
|
||||
*
|
||||
* This mechanism is nice because it's thread-safe. It's even safe to do if
|
||||
* another thread is currently running the function we're modifying!
|
||||
|
@ -35,28 +35,31 @@ namespace net {
|
||||
of 2 would just let you eat 2 slices on day 5 (the credits for day 4 and day
|
||||
5) and finish the cake in the usual 8 days.
|
||||
|
||||
EventTokenBucket(hz=20, burst=5) creates a token bucket with the following properties:
|
||||
EventTokenBucket(hz=20, burst=5) creates a token bucket with the following
|
||||
properties:
|
||||
|
||||
+ events from an infinite stream will be admitted 20 times per second (i.e.
|
||||
hz=20 means 1 event per 50 ms). Timers will be used to space things evenly down to
|
||||
5ms gaps (i.e. up to 200hz). Token buckets with rates greater than 200hz will admit
|
||||
multiple events with 5ms gaps between them. 10000hz is the maximum rate and 1hz is
|
||||
the minimum rate.
|
||||
hz=20 means 1 event per 50 ms). Timers will be used to space things evenly
|
||||
down to 5ms gaps (i.e. up to 200hz). Token buckets with rates greater than
|
||||
200hz will admit multiple events with 5ms gaps between them. 10000hz is the
|
||||
maximum rate and 1hz is the minimum rate.
|
||||
|
||||
+ The burst size controls the limit of 'credits' that a token bucket can accumulate
|
||||
when idle. For our (20,5) example each event requires 50ms of credit (again, 20hz = 50ms
|
||||
per event). a burst size of 5 means that the token bucket can accumulate a
|
||||
maximum of 250ms (5 * 50ms) for this bucket. If no events have been admitted for the
|
||||
last full second the bucket can still only accumulate 250ms of credit - but that credit
|
||||
means that 5 events can be admitted without delay. A burst size of 1 is the minimum.
|
||||
The EventTokenBucket is created with maximum credits already applied, but they
|
||||
can be cleared with the ClearCredits() method. The maximum burst size is
|
||||
15 minutes worth of events.
|
||||
+ The burst size controls the limit of 'credits' that a token bucket can
|
||||
accumulate when idle. For our (20,5) example each event requires 50ms of
|
||||
credit (again, 20hz = 50ms per event). a burst size of 5 means that the
|
||||
token bucket can accumulate a maximum of 250ms (5 * 50ms) for this bucket.
|
||||
If no events have been admitted for the last full second the bucket can
|
||||
still only accumulate 250ms of credit - but that credit means that 5 events
|
||||
can be admitted without delay. A burst size of 1 is the minimum. The
|
||||
EventTokenBucket is created with maximum credits already applied, but they
|
||||
can be cleared with the ClearCredits() method. The maximum burst size is 15
|
||||
minutes worth of events.
|
||||
|
||||
+ An event is submitted to the token bucket asynchronously through SubmitEvent().
|
||||
The OnTokenBucketAdmitted() method of the submitted event is used as a callback
|
||||
when the event is ready to run. A cancelable event is returned to the SubmitEvent() caller
|
||||
for use in the case they do not wish to wait for the callback.
|
||||
+ An event is submitted to the token bucket asynchronously through
|
||||
SubmitEvent(). The OnTokenBucketAdmitted() method of the submitted event
|
||||
is used as a callback when the event is ready to run. A cancelable event is
|
||||
returned to the SubmitEvent() caller for use in the case they do not wish
|
||||
to wait for the callback.
|
||||
*/
|
||||
|
||||
class EventTokenBucket;
|
||||
|
@ -803,9 +803,11 @@ nsAtomicFileOutputStream::DoOpen()
|
||||
}
|
||||
|
||||
// follow symlinks, for two reasons:
|
||||
// 1) if a user has deliberately set up a profile file as a symlink, we honor it
|
||||
// 2) to make the MoveToNative() in Finish() an atomic operation (which may not
|
||||
// be the case if moving across directories on different filesystems).
|
||||
// 1) if a user has deliberately set up a profile file as a symlink, we
|
||||
// honor it
|
||||
// 2) to make the MoveToNative() in Finish() an atomic operation (which may
|
||||
// not be the case if moving across directories on different
|
||||
// filesystems).
|
||||
nsCOMPtr<nsIFile> tempResult;
|
||||
rv = file->Clone(getter_AddRefs(tempResult));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
3
netwerk/cache/nsCacheEntry.cpp
vendored
3
netwerk/cache/nsCacheEntry.cpp
vendored
@ -128,7 +128,8 @@ nsCacheEntry::TouchMetaData()
|
||||
* 0 descriptors (new entry)
|
||||
* 0 descriptors (existing, bound entry)
|
||||
* n descriptors (existing, bound entry) valid
|
||||
* n descriptors (existing, bound entry) not valid (wait until valid or doomed)
|
||||
* n descriptors (existing, bound entry) not valid (wait until valid or
|
||||
* doomed)
|
||||
*/
|
||||
|
||||
nsresult
|
||||
|
5
netwerk/cache/nsCacheService.cpp
vendored
5
netwerk/cache/nsCacheService.cpp
vendored
@ -2873,7 +2873,10 @@ nsCacheService::ProcessPendingRequests(nsCacheEntry * entry)
|
||||
rv = entry->RequestAccess(request, &accessGranted);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"if entry is valid, RequestAccess must succeed.");
|
||||
// XXX if (newWriter) NS_ASSERTION( accessGranted == request->AccessRequested(), "why not?");
|
||||
// XXX if (newWriter) {
|
||||
// NS_ASSERTION( accessGranted ==
|
||||
// request->AccessRequested(), "why not?");
|
||||
// }
|
||||
|
||||
// entry->CreateDescriptor dequeues request, and queues descriptor
|
||||
nsICacheEntryDescriptor *descriptor = nullptr;
|
||||
|
6
netwerk/cache/nsDiskCacheBinding.h
vendored
6
netwerk/cache/nsDiskCacheBinding.h
vendored
@ -73,11 +73,13 @@ nsDiskCacheBinding * GetCacheEntryBinding(nsCacheEntry * entry);
|
||||
* (which need to be doomed, instead of just evicted. Collisions are linked
|
||||
* using a PRCList to keep track of current generation number.
|
||||
*
|
||||
* Used to detect hash number collisions, and find available generation numbers.
|
||||
* Used to detect hash number collisions, and find available generation
|
||||
* numbers.
|
||||
*
|
||||
* Not all nsDiskCacheBinding have a generation number.
|
||||
*
|
||||
* Generation numbers may be aquired late, or lost (when data fits in block file)
|
||||
* Generation numbers may be aquired late, or lost (when data fits in block
|
||||
* file)
|
||||
*
|
||||
* Collisions can occur:
|
||||
* BindEntry() - hashnumbers collide (possibly different keys)
|
||||
|
3
netwerk/cache/nsDiskCacheBlockFile.cpp
vendored
3
netwerk/cache/nsDiskCacheBlockFile.cpp
vendored
@ -361,7 +361,8 @@ nsDiskCacheBlockFile::CalcBlockFileSize()
|
||||
/******************************************************************************
|
||||
* Write
|
||||
*
|
||||
* Wrapper around PR_Write that grows file in larger chunks to combat fragmentation
|
||||
* Wrapper around PR_Write that grows file in larger chunks to combat
|
||||
* fragmentation
|
||||
*
|
||||
*****************************************************************************/
|
||||
bool
|
||||
|
3
netwerk/cache/nsDiskCacheMap.cpp
vendored
3
netwerk/cache/nsDiskCacheMap.cpp
vendored
@ -626,7 +626,8 @@ nsDiskCacheMap::VisitRecords( nsDiskCacheRecordVisitor * visitor)
|
||||
/**
|
||||
* EvictRecords
|
||||
*
|
||||
* Just like VisitRecords, but visits the records in order of their eviction rank
|
||||
* Just like VisitRecords, but visits the records in order of their eviction
|
||||
* rank
|
||||
*/
|
||||
nsresult
|
||||
nsDiskCacheMap::EvictRecords( nsDiskCacheRecordVisitor * visitor)
|
||||
|
2
netwerk/cache/nsDiskCacheMap.h
vendored
2
netwerk/cache/nsDiskCacheMap.h
vendored
@ -23,6 +23,7 @@
|
||||
class nsDiskCacheBinding;
|
||||
struct nsDiskCacheEntry;
|
||||
|
||||
// clang-format off
|
||||
/******************************************************************************
|
||||
* nsDiskCacheRecord
|
||||
*
|
||||
@ -49,6 +50,7 @@ struct nsDiskCacheEntry;
|
||||
* determine its actual size if necessary.
|
||||
*
|
||||
*****************************************************************************/
|
||||
// clang-format on
|
||||
|
||||
/*
|
||||
We have 3 block files with roughly the same max size (32MB)
|
||||
|
@ -390,9 +390,10 @@ bool CacheEntry::Load(bool aTruncate, bool aPriority)
|
||||
bool reportMiss = false;
|
||||
|
||||
// Check the index under two conditions for two states and take appropriate action:
|
||||
// 1. When this is a disk entry and not told to truncate, check there is a disk file.
|
||||
// If not, set the 'truncate' flag to true so that this entry will open instantly
|
||||
// as a new one.
|
||||
// 1. When this is a disk entry and not told to truncate, check there is a
|
||||
// disk file.
|
||||
// If not, set the 'truncate' flag to true so that this entry will open
|
||||
// instantly as a new one.
|
||||
// 2. When this is a memory-only entry, check there is a disk file.
|
||||
// If there is or could be, doom that file.
|
||||
if ((!aTruncate || !mUseDisk) && NS_SUCCEEDED(rv)) {
|
||||
|
@ -353,12 +353,13 @@ private:
|
||||
bool mSecurityInfoLoaded : 1;
|
||||
// Prevents any callback invocation
|
||||
bool mPreventCallbacks : 1;
|
||||
// true: after load and an existing file, or after output stream has been opened.
|
||||
// note - when opening an input stream, and this flag is false, output stream
|
||||
// is open along ; this makes input streams on new entries behave correctly
|
||||
// when EOF is reached (WOULD_BLOCK is returned).
|
||||
// false: after load and a new file, or dropped to back to false when a writer
|
||||
// fails to open an output stream.
|
||||
// true: after load and an existing file, or after output stream has been
|
||||
// opened.
|
||||
// note - when opening an input stream, and this flag is false, output
|
||||
// stream is open along ; this makes input streams on new entries
|
||||
// behave correctly when EOF is reached (WOULD_BLOCK is returned).
|
||||
// false: after load and a new file, or dropped to back to false when a
|
||||
// writer fails to open an output stream.
|
||||
bool mHasData : 1;
|
||||
// The indication of pinning this entry was open with
|
||||
bool mPinned : 1;
|
||||
|
@ -108,7 +108,8 @@ private:
|
||||
bool mDoomWhenFoundPinned : 1;
|
||||
bool mDoomWhenFoundNonPinned : 1;
|
||||
// Set when after shutdown AND:
|
||||
// - when writing: writing data (not metadata) OR the physical file handle is not currently open
|
||||
// - when writing: writing data (not metadata) OR the physical file handle is
|
||||
// not currently open
|
||||
// - when truncating: the physical file handle is not currently open
|
||||
// When set it prevents any further writes or truncates on such handles to happen immediately
|
||||
// after shutdown and gives a chance to write metadata of already open files quickly as possible
|
||||
@ -308,7 +309,8 @@ public:
|
||||
// PinningDoomRestriction:
|
||||
// NO_RESTRICTION
|
||||
// no restriction is checked, the file is simply always doomed
|
||||
// DOOM_WHEN_(NON)_PINNED, we branch based on the pinning status of the handle:
|
||||
// DOOM_WHEN_(NON)_PINNED, we branch based on the pinning status of the
|
||||
// handle:
|
||||
// UNKNOWN: the handle is marked to be doomed when later found (non)pinned
|
||||
// PINNED/NON_PINNED: doom only when the restriction matches the pin status
|
||||
// and the handle has not yet been required to doom during the UNKNOWN
|
||||
|
@ -475,7 +475,8 @@ CacheFileOutputStream::NotifyListener()
|
||||
size_t
|
||||
CacheFileOutputStream::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
// Everything the stream keeps a reference to is already reported somewhere else.
|
||||
// Everything the stream keeps a reference to is already reported somewhere
|
||||
// else.
|
||||
// mFile reports itself.
|
||||
// mChunk reported as part of CacheFile.
|
||||
// mCloseListener is CacheEntry, already reported.
|
||||
|
@ -3859,6 +3859,7 @@ nsCookieService::AddInternal(const nsCookieKey &aKey,
|
||||
* private cookie header parsing functions
|
||||
******************************************************************************/
|
||||
|
||||
// clang-format off
|
||||
// The following comment block elucidates the function of ParseAttributes.
|
||||
/******************************************************************************
|
||||
** Augmented BNF, modified from RFC2109 Section 4.2.2 and RFC2616 Section 2.1
|
||||
@ -3927,6 +3928,7 @@ nsCookieService::AddInternal(const nsCookieKey &aKey,
|
||||
| "HttpOnly"
|
||||
|
||||
******************************************************************************/
|
||||
// clang-format on
|
||||
|
||||
// helper functions for GetTokenValue
|
||||
static inline bool iswhitespace (char c) { return c == ' ' || c == '\t'; }
|
||||
|
@ -26,8 +26,8 @@ public:
|
||||
explicit nsDNSServiceDiscovery() = default;
|
||||
|
||||
/*
|
||||
** The mDNS service is started on demand. If no one uses, mDNS service will not
|
||||
** start. Therefore, all operations before service started will fail
|
||||
** The mDNS service is started on demand. If no one uses, mDNS service will
|
||||
** not start. Therefore, all operations before service started will fail
|
||||
** and get error code |kDNSServiceErr_ServiceNotRunning| defined in dns_sd.h.
|
||||
**/
|
||||
nsresult Init();
|
||||
|
@ -139,10 +139,11 @@ protected:
|
||||
|
||||
uint16_t mResolving; // counter of outstanding resolving calls
|
||||
|
||||
uint8_t negative : 1; /* True if this record is a cache of a failed lookup.
|
||||
Negative cache entries are valid just like any other
|
||||
(though never for more than 60 seconds), but a use
|
||||
of that negative entry forces an asynchronous refresh. */
|
||||
uint8_t negative : 1; /* True if this record is a cache of a failed
|
||||
lookup. Negative cache entries are valid just
|
||||
like any other (though never for more than 60
|
||||
seconds), but a use of that negative entry
|
||||
forces an asynchronous refresh. */
|
||||
uint8_t mDoomed : 1; // explicitly expired
|
||||
};
|
||||
|
||||
@ -230,8 +231,10 @@ private:
|
||||
// or owned by one of the worker threads. */
|
||||
uint16_t mTRRUsed : 1; // TRR was used on this record
|
||||
uint16_t mNativeUsed : 1;
|
||||
uint16_t onQueue : 1; // true if pending and on the queue (not yet given to getaddrinfo())
|
||||
uint16_t usingAnyThread : 1; // true if off queue and contributing to mActiveAnyThreadCount
|
||||
uint16_t onQueue : 1; // true if pending and on the queue (not yet
|
||||
// given to getaddrinfo())
|
||||
uint16_t usingAnyThread : 1; // true if off queue and contributing to
|
||||
// mActiveAnyThreadCount
|
||||
uint16_t mDidCallbacks : 1;
|
||||
uint16_t mGetTtl : 1;
|
||||
|
||||
|
@ -14,7 +14,8 @@ https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-06
|
||||
* use established https channel for http instead separate of conninfo hash
|
||||
* pin via http-tls header
|
||||
* clear based on origin when a random fail happens not just 421
|
||||
* upon establishment of channel, cancel and retry trans that have not yet written anything
|
||||
* upon establishment of channel, cancel and retry trans that have not yet
|
||||
written anything
|
||||
* persistent storage (including private browsing filter)
|
||||
* memory reporter for cache, but this is rather tiny
|
||||
*/
|
||||
|
@ -57,7 +57,8 @@ that has been read is stored mInputData
|
||||
nsHttpTransaction::WriteSegment(real http transaction)
|
||||
TLSFilterTransaction::OnWriteSegment() removes tls on way back up stack
|
||||
SpdyConnectTransaction.mTunneledConn::OnWriteSegment()
|
||||
SpdyConnectTransaction.mTunneledConn.mTunnelStreamIn->Read() // gets data from mInputData
|
||||
// gets data from mInputData
|
||||
SpdyConnectTransaction.mTunneledConn.mTunnelStreamIn->Read()
|
||||
|
||||
The output path works similarly:
|
||||
nsHttpConnection::OnOutputStreamReady (real socket)
|
||||
@ -68,10 +69,14 @@ The output path works similarly:
|
||||
SpdyConnectTransaction.mTunneledConn::OnOutputStreamReady (tunnel connection)
|
||||
SpdyConnectTransaction.mTunneledConn::OnSocketWritable (tunnel connection)
|
||||
TLSFilterTransaction::ReadSegment()
|
||||
nsHttpTransaction::ReadSegment (real http transaction generates plaintext on way down)
|
||||
TLSFilterTransaction::OnReadSegment (BUF and LEN gets encrypted here on way down)
|
||||
SpdyConnectTransaction.mTunneledConn::OnReadSegment (BUF and LEN) (tunnel connection)
|
||||
SpdyConnectTransaction.mTunneledConn.mTunnelStreamOut->Write(BUF, LEN) .. get stored in mOutputData
|
||||
nsHttpTransaction::ReadSegment (real http transaction generates plaintext on
|
||||
way down)
|
||||
TLSFilterTransaction::OnReadSegment (BUF and LEN gets encrypted here on way
|
||||
down)
|
||||
SpdyConnectTransaction.mTunneledConn::OnReadSegment (BUF and LEN)
|
||||
(tunnel connection)
|
||||
SpdyConnectTransaction.mTunneledConn.mTunnelStreamOut->Write(BUF, LEN) ..
|
||||
get stored in mOutputData
|
||||
|
||||
Now pop the stack back up to SpdyConnectTransaction::ReadSegment(), where it has
|
||||
the encrypted text available in mOutputData
|
||||
|
@ -584,10 +584,10 @@ private:
|
||||
|
||||
// This function selects transactions from mPendingTransactionTable to dispatch
|
||||
// according to the following conditions:
|
||||
// 1. When ActiveTabPriority() is false, only get transactions from the queue
|
||||
// whose window id is 0.
|
||||
// 2. If |considerAll| is false, either get transactions from the focused window
|
||||
// queue or non-focused ones.
|
||||
// 1. When ActiveTabPriority() is false, only get transactions from the
|
||||
// queue whose window id is 0.
|
||||
// 2. If |considerAll| is false, either get transactions from the focused
|
||||
// window queue or non-focused ones.
|
||||
// 3. If |considerAll| is true, fill the |pendingQ| with the transactions from
|
||||
// both focused window and non-focused window queues.
|
||||
void PreparePendingQForDispatching(nsConnectionEntry *ent,
|
||||
|
@ -698,7 +698,8 @@ nsHttpResponseHead::ComputeCurrentAge(uint32_t now,
|
||||
// <or>
|
||||
// freshnessLifetime = expires_value - date_value
|
||||
// <or>
|
||||
// freshnessLifetime = min(one-week,(date_value - last_modified_value) * 0.10)
|
||||
// freshnessLifetime = min(one-week,
|
||||
// (date_value - last_modified_value) * 0.10)
|
||||
// <or>
|
||||
// freshnessLifetime = 0
|
||||
//
|
||||
|
@ -47,7 +47,8 @@ ServerTimingParser::Parse()
|
||||
// Server-Timing = #server-timing-metric
|
||||
// server-timing-metric = metric-name *( OWS ";" OWS server-timing-param )
|
||||
// metric-name = token
|
||||
// server-timing-param = server-timing-param-name OWS "=" OWS server-timing-param-value
|
||||
// server-timing-param = server-timing-param-name OWS "=" OWS
|
||||
// server-timing-param-value
|
||||
// server-timing-param-name = token
|
||||
// server-timing-param-value = token / quoted-string
|
||||
|
||||
|
@ -1303,9 +1303,10 @@ DataChannelConnection::SendDeferredMessages()
|
||||
bool wasOverThreshold = bufferedAmount >= threshold;
|
||||
|
||||
// Send buffered data messages
|
||||
// Warning: This will fail in case ndata is inactive and a previously deallocated data channel
|
||||
// has not been closed properly. If you ever see that no messages can be sent on any
|
||||
// channel, this is likely the cause (an explicit EOR message partially sent whose
|
||||
// Warning: This will fail in case ndata is inactive and a previously
|
||||
// deallocated data channel has not been closed properly. If you
|
||||
// ever see that no messages can be sent on any channel, this is
|
||||
// likely the cause (an explicit EOR message partially sent whose
|
||||
// remaining chunks are still being waited for).
|
||||
blocked = SendBufferedMessages(channel->mBufferedData);
|
||||
bufferedAmount = channel->GetBufferedAmountLocked();
|
||||
@ -1330,8 +1331,9 @@ DataChannelConnection::SendDeferredMessages()
|
||||
}
|
||||
|
||||
// Update current stream index
|
||||
// Note: If ndata is not active, the outstanding data messages on this stream need to be sent
|
||||
// first before other streams can be used for sending.
|
||||
// Note: If ndata is not active, the outstanding data messages on this
|
||||
// stream need to be sent first before other streams can be used for
|
||||
// sending.
|
||||
if (mSendInterleaved || !blocked) {
|
||||
i = UpdateCurrentStreamIndex();
|
||||
}
|
||||
@ -1552,8 +1554,8 @@ DataChannelConnection::BufferMessage(nsACString& recvBuffer, const void *data,
|
||||
}
|
||||
|
||||
// Ensure it doesn't blow up our buffer
|
||||
// TODO: Change 'WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_LOCAL' to whatever the new buffer is capable
|
||||
// of holding.
|
||||
// TODO: Change 'WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_LOCAL' to whatever the
|
||||
// new buffer is capable of holding.
|
||||
if (((uint64_t) recvBuffer.Length()) + ((uint64_t) length) > WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_LOCAL) {
|
||||
bufferFlags |= DATA_CHANNEL_BUFFER_MESSAGE_FLAGS_TOO_LARGE;
|
||||
return bufferFlags;
|
||||
@ -1882,8 +1884,8 @@ DataChannelConnection::HandleAssociationChangeEvent(const struct sctp_assoc_chan
|
||||
#if defined(SCTP_ASSOC_SUPPORTS_INTERLEAVING)
|
||||
case SCTP_ASSOC_SUPPORTS_INTERLEAVING:
|
||||
LOG(("Supports: NDATA"));
|
||||
// TODO: This should probably be set earlier above in 'case SCTP_COMM_UP' but we also
|
||||
// need this for 'SCTP_RESTART'.
|
||||
// TODO: This should probably be set earlier above in 'case
|
||||
// SCTP_COMM_UP' but we also need this for 'SCTP_RESTART'.
|
||||
mSendInterleaved = true;
|
||||
break;
|
||||
#endif
|
||||
@ -2784,9 +2786,9 @@ DataChannelConnection::SendDataMsg(DataChannel &channel, const uint8_t *data, si
|
||||
// SendDataMsgInternalOrBuffer avoids blocking.
|
||||
|
||||
if (mPpidFragmentation) {
|
||||
// TODO: Bug 1381136, remove this block and all other code that uses PPIDs for fragmentation
|
||||
// and reassembly once older Firefoxes without EOR are no longer supported as target
|
||||
// clients.
|
||||
// TODO: Bug 1381136, remove this block and all other code that uses PPIDs
|
||||
// for fragmentation and reassembly once older Firefoxes without EOR
|
||||
// are no longer supported as target clients.
|
||||
|
||||
// Use the deprecated PPID-level fragmentation if enabled. Should be enabled
|
||||
// in case we can be certain that the other peer is an older Firefox browser
|
||||
@ -2800,8 +2802,9 @@ DataChannelConnection::SendDataMsg(DataChannel &channel, const uint8_t *data, si
|
||||
|
||||
size_t left = len;
|
||||
while (left > 0) {
|
||||
// Note: For correctness, chunkLen should also consider mMaxMessageSize as minimum but as
|
||||
// this block is going to be removed soon, I see no need for it.
|
||||
// Note: For correctness, chunkLen should also consider mMaxMessageSize
|
||||
// as minimum but as this block is going to be removed soon, I
|
||||
// see no need for it.
|
||||
size_t chunkLen = std::min<size_t>(left, DATA_CHANNEL_MAX_BINARY_FRAGMENT);
|
||||
left -= chunkLen;
|
||||
uint32_t ppid = left > 0 ? ppidPartial : ppidFinal;
|
||||
|
@ -24,8 +24,8 @@
|
||||
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_LOCAL 1073741823
|
||||
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_REMOTE_DEFAULT 65536
|
||||
// TODO: Bug 1382779, once resolved, can be increased to min(Uint8ArrayMaxSize, UINT32_MAX)
|
||||
// TODO: Bug 1381146, once resolved, can be increased to whatever we support then (hopefully
|
||||
// SIZE_MAX) or be removed
|
||||
// TODO: Bug 1381146, once resolved, can be increased to whatever we support
|
||||
// then (hopefully SIZE_MAX) or be removed
|
||||
#define WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_REMOTE 2147483637
|
||||
|
||||
#define DATA_CHANNEL_PPID_CONTROL 50
|
||||
|
@ -324,6 +324,7 @@ int ParseFTPList(const char *line, struct list_state *state,
|
||||
}
|
||||
if (lstyle == 'V')
|
||||
{
|
||||
// clang-format off
|
||||
/*
|
||||
* MultiNet FTP:
|
||||
* LOGIN.COM;2 1 4-NOV-1994 04:09 [ANONYMOUS] (RWE,RWE,,)
|
||||
@ -341,6 +342,7 @@ int ParseFTPList(const char *line, struct list_state *state,
|
||||
* THIS-IS-A-LONG-VMS-FILENAME.AND-THIS-IS-A-LONG-VMS-FILETYPE\r\n
|
||||
* 213[/nnn] 29-JAN-1996 03:33[:nn] [ANONYMOU,ANONYMOUS] (RWED,RWED,,)
|
||||
*/
|
||||
// clang-format on
|
||||
tokmarker = 0;
|
||||
p = tokens[0];
|
||||
pos = 0;
|
||||
@ -714,6 +716,7 @@ int ParseFTPList(const char *line, struct list_state *state,
|
||||
#if defined(SUPPORT_DOS) /* WinNT DOS dirstyle */
|
||||
if (!lstyle && (!state->lstyle || state->lstyle == 'W'))
|
||||
{
|
||||
// clang-format off
|
||||
/*
|
||||
* "10-23-00 01:27PM <DIR> veronist"
|
||||
* "06-15-00 07:37AM <DIR> zoe"
|
||||
@ -727,6 +730,7 @@ int ParseFTPList(const char *line, struct list_state *state,
|
||||
// "10-10-2014 10:10AM <DIR> FTP"
|
||||
// Windows CE FTP server returns time in 24-hour format:
|
||||
// "05-03-13 22:01 <DIR> APPS"
|
||||
// clang-format on
|
||||
if ((numtoks >= 4) && (toklen[0] == 8 || toklen[0] == 10) &&
|
||||
(toklen[1] == 5 || toklen[1] == 7) &&
|
||||
(*tokens[2] == '<' || IsAsciiDigit(*tokens[2])) )
|
||||
|
@ -252,7 +252,8 @@ private:
|
||||
/**
|
||||
@param text (in), col0 (in): see GlyphHit
|
||||
@param tagTXT (in): Smily, see also StructPhraseHit
|
||||
@param imageName (in): the basename of the file that contains the image for this smilie
|
||||
@param imageName (in): the basename of the file that contains the image for
|
||||
this smilie
|
||||
@param outputHTML (out): new string containing the html for the smily
|
||||
@param glyphTextLen (out): see GlyphHit
|
||||
*/
|
||||
|
@ -455,9 +455,9 @@ nsMultiMixedConv::AsyncConvertData(const char *aFromType, const char *aToType,
|
||||
// hook up our final listener. this guy gets the various On*() calls we want to throw
|
||||
// at him.
|
||||
//
|
||||
// WARNING: this listener must be able to handle multiple OnStartRequest, OnDataAvail()
|
||||
// and OnStopRequest() call combinations. We call of series of these for each sub-part
|
||||
// in the raw stream.
|
||||
// WARNING: this listener must be able to handle multiple OnStartRequest,
|
||||
// OnDataAvail() and OnStopRequest() call combinations. We call of series
|
||||
// of these for each sub-part in the raw stream.
|
||||
mFinalListener = aListener;
|
||||
|
||||
return NS_OK;
|
||||
|
@ -97,16 +97,18 @@ protected:
|
||||
// main stream and sending them off the destination stream listener, than doing any real
|
||||
// stream parsing/converting.
|
||||
//
|
||||
// WARNING: This converter requires that it's destination stream listener be able to handle
|
||||
// multiple OnStartRequest(), OnDataAvailable(), and OnStopRequest() call combinations.
|
||||
// Each series represents the beginning, data production, and ending phase of each sub-
|
||||
// part of the original stream.
|
||||
// WARNING: This converter requires that it's destination stream listener be
|
||||
// able to handle multiple OnStartRequest(), OnDataAvailable(), and
|
||||
// OnStopRequest() call combinations. Each series represents the beginning,
|
||||
// data production, and ending phase of each sub- part of the original
|
||||
// stream.
|
||||
//
|
||||
// NOTE: this MIME-type is used by HTTP, *not* SMTP, or IMAP.
|
||||
//
|
||||
// NOTE: For reference, a general description of how this MIME type should be handled via
|
||||
// HTTP, see http://home.netscape.com/assist/net_sites/pushpull.html . Note that
|
||||
// real world server content deviates considerably from this overview.
|
||||
// NOTE: For reference, a general description of how this MIME type should be
|
||||
// handled via HTTP, see
|
||||
// http://home.netscape.com/assist/net_sites/pushpull.html . Note that real
|
||||
// world server content deviates considerably from this overview.
|
||||
//
|
||||
// Implementation assumptions:
|
||||
// Assumed structue:
|
||||
|
@ -278,7 +278,8 @@ class nsParser final : public nsIParser,
|
||||
|
||||
/**
|
||||
* Set to parser state to indicate whether parsing tokens can be interrupted
|
||||
* @param aCanInterrupt true if parser can be interrupted, false if it can not be interrupted.
|
||||
* @param aCanInterrupt true if parser can be interrupted, false if it can
|
||||
* not be interrupted.
|
||||
* @update kmcclusk 5/18/98
|
||||
*/
|
||||
void SetCanInterrupt(bool aCanInterrupt);
|
||||
|
@ -344,24 +344,27 @@ nsScannerString::DiscardPrefix( const nsScannerIterator& aIter )
|
||||
void
|
||||
nsScannerString::UngetReadable( const nsAString& aReadable, const nsScannerIterator& aInsertPoint )
|
||||
/*
|
||||
* Warning: this routine manipulates the shared buffer list in an unexpected way.
|
||||
* The original design did not really allow for insertions, but this call promises
|
||||
* that if called for a point after the end of all extant token strings, that no token string
|
||||
* or the work string will be invalidated.
|
||||
* Warning: this routine manipulates the shared buffer list in an
|
||||
* unexpected way. The original design did not really allow for
|
||||
* insertions, but this call promises that if called for a point after the
|
||||
* end of all extant token strings, that no token string or the work string
|
||||
* will be invalidated.
|
||||
*
|
||||
* This routine is protected because it is the responsibility of the derived class to keep those promises.
|
||||
* This routine is protected because it is the responsibility of the
|
||||
* derived class to keep those promises.
|
||||
*/
|
||||
{
|
||||
Position insertPos(aInsertPoint);
|
||||
|
||||
mBufferList->SplitBuffer(insertPos);
|
||||
// splitting to the right keeps the work string and any extant token pointing to and
|
||||
// holding a reference count on the same buffer
|
||||
// splitting to the right keeps the work string and any extant token
|
||||
// pointing to and holding a reference count on the same buffer
|
||||
|
||||
Buffer* new_buffer = AllocBufferFromString(aReadable);
|
||||
// make a new buffer with all the data to insert...
|
||||
// BULLSHIT ALERT: we may have empty space to re-use in the split buffer, measure the cost
|
||||
// of this and decide if we should do the work to fill it
|
||||
// BULLSHIT ALERT: we may have empty space to re-use in the split buffer,
|
||||
// measure the cost of this and decide if we should do the work to fill
|
||||
// it
|
||||
|
||||
Buffer* buffer_to_split = insertPos.mBuffer;
|
||||
mBufferList->InsertAfter(new_buffer, buffer_to_split);
|
||||
|
@ -87,6 +87,7 @@ static const size_t NUM_TEST_EV_ROOTS = 2;
|
||||
#endif
|
||||
|
||||
static const struct EVInfo kEVInfos[] = {
|
||||
// clang-format off
|
||||
// IMPORTANT! When extending this list, if you add another entry that uses
|
||||
// the same dottedOid as an existing entry, use the same oidName.
|
||||
#ifdef DEBUG
|
||||
@ -94,8 +95,8 @@ static const struct EVInfo kEVInfos[] = {
|
||||
// 1.3.6.1.4.1.13769.666.666.666.1.500.9.1.
|
||||
// (multiple entries with the same OID is ok)
|
||||
// If you add or remove debug EV certs you must also modify NUM_TEST_EV_ROOTS
|
||||
// so that the correct number of certs are skipped as these debug EV certs are
|
||||
// NOT part of the default trust store.
|
||||
// so that the correct number of certs are skipped as these debug EV certs
|
||||
// are NOT part of the default trust store.
|
||||
{
|
||||
// This is the PSM xpcshell testing EV certificate. It can be generated
|
||||
// using pycert.py and the following specification:
|
||||
@ -892,6 +893,7 @@ static const struct EVInfo kEVInfos[] = {
|
||||
"ViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQSBSMg==",
|
||||
"VrYpzTS8ePY=",
|
||||
},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static SECOidTag sEVInfoOIDTags[ArrayLength(kEVInfos)];
|
||||
|
@ -62,17 +62,20 @@ const char* kOverrideCaIntermediatePem = "-----BEGIN CERTIFICATE-----\n" \
|
||||
// SHA256 Fingerprint: A3:05:0C:44:CD:6D:1E:BE:A2:18:80:09:93:69:90:7F
|
||||
// 8C:E3:9F:A4:33:CB:E3:E9:3C:D1:8E:8C:89:23:1B:4A
|
||||
|
||||
// clang-format off
|
||||
// Invocation: security/manager/tools/crtshToIdentifyingStruct/crtshToIdentifyingStruct.py -listname OverrideCaDNs -dn /tmp/overrideCa.pem
|
||||
static const uint8_t CAcaDN[15] = {
|
||||
0x30, 0x0D, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x02,
|
||||
0x63, 0x61,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static const DataAndLength OverrideCaDNs[]= {
|
||||
{ CAcaDN,
|
||||
sizeof(CAcaDN) },
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
// Invocation: security/manager/tools/crtshToIdentifyingStruct/crtshToIdentifyingStruct.py -listname OverrideCaSPKIs -spki /tmp/overrideCa.pem
|
||||
static const uint8_t CAcaSPKI[294] = {
|
||||
0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
|
||||
@ -99,6 +102,7 @@ static const uint8_t CAcaSPKI[294] = {
|
||||
0x49, 0x23, 0xFA, 0x72, 0x51, 0xC4, 0x31, 0xD5, 0x03, 0xAC, 0xDA, 0x18, 0x0A,
|
||||
0x35, 0xED, 0x8D, 0x02, 0x03, 0x01, 0x00, 0x01,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static const DataAndLength OverrideCaSPKIs[]= {
|
||||
{ CAcaSPKI, sizeof(CAcaSPKI) },
|
||||
@ -159,4 +163,4 @@ TEST_F(psm_TrustOverrideTest, CheckCertSPKIIsInList)
|
||||
<< "CA should be in the SPKI list";
|
||||
EXPECT_FALSE(CertSPKIIsInList(intObj.get(), OverrideCaSPKIs))
|
||||
<< "Int should not be in the SPKI list";
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ deserializeAndVerify(const nsCString &serializedSecInfo,
|
||||
|
||||
TEST(psm_DeserializeCert, gecko33)
|
||||
{
|
||||
// clang-format off
|
||||
// Gecko 33+ vintage Security info serialized with UUIDs:
|
||||
// - nsISupports 00000000-0000-0000-c000-000000000046
|
||||
// - nsISSLStatus fa9ba95b-ca3b-498a-b889-7c79cf28fee8
|
||||
@ -104,12 +105,14 @@ TEST(psm_DeserializeCert, gecko33)
|
||||
"2cqB1GG4esFOalvI52dzn+J4fTIYZvNF+AtGyHSLm2XRXYZCw455laUKf6Sk9RDShDgUvzhOKL4GXfTwKXv12MyMknJybH8UCpjC"
|
||||
"HZmFBVHMcUN/87HsQo20PdOekeEvkjrrMIxW+gxw22Yb67yF/qKgwrWr+43bLN709iyw+LWiU7sQcHL2xk9SYiWQDj2tYz2soObV"
|
||||
"QYTJm0VUZMEVFhtALq46cx92Zu4vFwC8AAwAAAAABAQAA");
|
||||
// clang-format on
|
||||
|
||||
deserializeAndVerify(base64Serialization, false);
|
||||
}
|
||||
|
||||
TEST(psm_DeserializeCert, gecko46)
|
||||
{
|
||||
// clang-format off
|
||||
// Gecko 46+ vintage Security info serialized with UUIDs:
|
||||
// - nsISupports 00000000-0000-0000-c000-000000000046
|
||||
// - nsISSLStatus fa9ba95b-ca3b-498a-b889-7c79cf28fee8
|
||||
@ -137,12 +140,14 @@ TEST(psm_DeserializeCert, gecko46)
|
||||
"Bx3VmDRynTe4CqhsAwOoO1ERmCAmsAJBwY/rNr4mK22p8erBrqMW0nYXYU5NFynI+pNTjojhKD4II8PNV8G2yMWwYOb/u4+WPzUA"
|
||||
"HC9DpZdrWTEH/W69Cr/KxRqGsWPwpgMv2Wqav8jaT35JxqTXjOlhQqzo6fNn3eYOeCf4PkCxZKwckWjy10qDaRbjhwAMHAGj2TPr"
|
||||
"idlvOj/7QyyX5m8up/1US8z1fRW4yoCSOt6V2bwuH6cAvAAMAAAAAAQEAAA==");
|
||||
// clang-format on
|
||||
|
||||
deserializeAndVerify(base64Serialization, false);
|
||||
}
|
||||
|
||||
TEST(psm_DeserializeCert, preSSLStatusConsolidation)
|
||||
{
|
||||
// clang-format off
|
||||
// Generated using serialized output of test "good.include-subdomains.pinning.example.com"
|
||||
// in security/manager/ssl/tests/unit/test_cert_chains.js
|
||||
nsCString base64Serialization(
|
||||
@ -184,12 +189,14 @@ TEST(psm_DeserializeCert, preSSLStatusConsolidation)
|
||||
"9cZFVtzRWYEYkIlicAyTiPw34bXzxU1cK6sCSmBR+UTXbRPGb4OOy3MRaoF1m3jxwnPkQwxezDiqJTydCbYcBu0sKwURAZOd5QK9"
|
||||
"22MsOsnrLjNlpRDmuH0VFhb5uN2I5mM3NvMnP2Or19O1Bk//iGD6AyJfiZFcii+FsDrJhbzw6lakEV7O/EnD0kk2l7I0VMtg1xZB"
|
||||
"bEw7P6+V9zz5cAzaaq7EB0mCE+jJckSzSETBN+7lyVD8gwmHYxxZfPnUM/yvPbMU9L3xWD/z6HHwO6r+9m7BT+2pHjBCAAA=");
|
||||
// clang-format on
|
||||
|
||||
deserializeAndVerify(base64Serialization, false);
|
||||
}
|
||||
|
||||
TEST(psm_DeserializeCert, preSSLStatusConsolidationFailedCertChain)
|
||||
{
|
||||
// clang-format off
|
||||
// Generated using serialized output of test "expired.example.com"
|
||||
// in security/manager/ssl/tests/unit/test_cert_chains.js
|
||||
nsCString base64Serialization(
|
||||
@ -250,6 +257,7 @@ TEST(psm_DeserializeCert, preSSLStatusConsolidationFailedCertChain)
|
||||
"4bXzxU1cK6sCSmBR+UTXbRPGb4OOy3MRaoF1m3jxwnPkQwxezDiqJTydCbYcBu0sKwURAZOd5QK922MsOsnrLjNlpRDmuH0VFhb5"
|
||||
"uN2I5mM3NvMnP2Or19O1Bk//iGD6AyJfiZFcii+FsDrJhbzw6lakEV7O/EnD0kk2l7I0VMtg1xZBbEw7P6+V9zz5cAzaaq7EB0mC"
|
||||
"E+jJckSzSETBN+7lyVD8gwmHYxxZfPnUM/yvPbMU9L3xWD/z6HHwO6r+9m7BT+2pHjBC");
|
||||
// clang-format on
|
||||
|
||||
deserializeAndVerify(base64Serialization, true, 2);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
// /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@ -889,13 +889,14 @@ NativeFileWatcherIOTask::DeactivateRunnableMethod()
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to dispatch a change notification to all the registered callbacks.
|
||||
* Helper function to dispatch a change notification to all the registered
|
||||
* callbacks.
|
||||
* @param aResourceDescriptor
|
||||
* The resource descriptor.
|
||||
* @param aChangedResource
|
||||
* The path of the changed resource.
|
||||
* @return NS_OK if all the callbacks are dispatched correctly, a |nsresult| error code
|
||||
* otherwise.
|
||||
* @return NS_OK if all the callbacks are dispatched correctly, a |nsresult|
|
||||
* error code otherwise.
|
||||
*/
|
||||
nsresult
|
||||
NativeFileWatcherIOTask::DispatchChangeCallbacks(
|
||||
@ -1025,12 +1026,14 @@ NativeFileWatcherIOTask::ReportSuccess(
|
||||
* Instructs the OS to report the changes concerning the directory of interest.
|
||||
*
|
||||
* @param aDirectoryDescriptor
|
||||
* A |WatchedResourceDescriptor| instance describing the directory to watch.
|
||||
* A |WatchedResourceDescriptor| instance describing the directory to
|
||||
* watch.
|
||||
* @param aDispatchErrorCode
|
||||
* If |ReadDirectoryChangesW| fails and dispatching an error callback to the
|
||||
* main thread fails as well, the error code is stored here. If the OS API call
|
||||
* does not fail, it gets set to NS_OK.
|
||||
* @return |true| if |ReadDirectoryChangesW| returned no error, |false| otherwise.
|
||||
* If |ReadDirectoryChangesW| fails and dispatching an error callback to
|
||||
* the main thread fails as well, the error code is stored here. If the
|
||||
* OS API call does not fail, it gets set to NS_OK.
|
||||
* @return |true| if |ReadDirectoryChangesW| returned no error, |false|
|
||||
* otherwise.
|
||||
*/
|
||||
nsresult
|
||||
NativeFileWatcherIOTask::AddDirectoryToWatchList(
|
||||
@ -1361,8 +1364,9 @@ NativeFileWatcherService::AddPath(const nsAString& aPathToWatch,
|
||||
* The optional callback to invoke when the file watcher stops
|
||||
* watching the resource for changes.
|
||||
*
|
||||
* @return NS_OK or NS_ERROR_NOT_INITIALIZED if the instance was not initialized.
|
||||
* Other errors are reported by the error callback function.
|
||||
* @return NS_OK or NS_ERROR_NOT_INITIALIZED if the instance was not
|
||||
* initialized. Other errors are reported by the error callback
|
||||
* function.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
NativeFileWatcherService::RemovePath(const nsAString& aPathToRemove,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -103,7 +103,8 @@
|
||||
first time changes its status to SYNC_STATUS_NORMAL. For bookmarks
|
||||
restored from a backup, we set SYNC_STATUS_UNKNOWN = 0, indicating that
|
||||
Sync should reconcile them with bookmarks on the server. If Sync is
|
||||
disconnected or never set up, all bookmarks will stay in SYNC_STATUS_NEW.
|
||||
disconnected or never set up, all bookmarks will stay in
|
||||
SYNC_STATUS_NEW.
|
||||
*/ \
|
||||
", syncStatus INTEGER NOT NULL DEFAULT 0" \
|
||||
/* This field is incremented for every bookmark change that should trigger
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -33,6 +33,7 @@
|
||||
* Spoofed keycodes for English content (US English keyboard layout).
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
CONTROL(Alt, AltLeft, dom::KeyboardEvent_Binding::DOM_VK_ALT)
|
||||
CONTROL(ArrowDown, ArrowDown, dom::KeyboardEvent_Binding::DOM_VK_DOWN)
|
||||
CONTROL(ArrowLeft, ArrowLeft, dom::KeyboardEvent_Binding::DOM_VK_LEFT)
|
||||
@ -40,8 +41,8 @@ CONTROL(ArrowRight, ArrowRight, dom::KeyboardEvent_Binding::DOM_VK_RIGHT)
|
||||
CONTROL(ArrowUp, ArrowUp, dom::KeyboardEvent_Binding::DOM_VK_UP)
|
||||
CONTROL(Backspace, Backspace, dom::KeyboardEvent_Binding::DOM_VK_BACK_SPACE)
|
||||
CONTROL(CapsLock, CapsLock, dom::KeyboardEvent_Binding::DOM_VK_CAPS_LOCK)
|
||||
// Leaving "ContextMenu" key unimplemented; not every english keyboard has this.
|
||||
// For example, MACOS doesn't have this.
|
||||
// Leaving "ContextMenu" key unimplemented; not every english keyboard has
|
||||
// this. For example, MACOS doesn't have this.
|
||||
CONTROL(Control, ControlLeft, dom::KeyboardEvent_Binding::DOM_VK_CONTROL)
|
||||
CONTROL(Delete, Delete, dom::KeyboardEvent_Binding::DOM_VK_DELETE)
|
||||
CONTROL(End, End, dom::KeyboardEvent_Binding::DOM_VK_END)
|
||||
@ -70,11 +71,11 @@ CONTROL(F9, F9, dom::KeyboardEvent_Binding::DOM_VK_F9)
|
||||
CONTROL(F10, F10, dom::KeyboardEvent_Binding::DOM_VK_F10)
|
||||
CONTROL(F11, F11, dom::KeyboardEvent_Binding::DOM_VK_F11)
|
||||
CONTROL(F12, F12, dom::KeyboardEvent_Binding::DOM_VK_F12)
|
||||
// Leaving "F13" to "F35" key unimplemented; they are some how platform dependent.
|
||||
// "F13" to "F19" are on MAC's full keyboard but may not exist on usual keyboard.
|
||||
// "F20" to "F24" are only available on Windows and Linux.
|
||||
// "F25" to "F35" are Linux only.
|
||||
// Leaving "Clear" key unimplemented; it's inconsistent between platforms.
|
||||
// Leaving "F13" to "F35" key unimplemented; they are some how platform
|
||||
// dependent. "F13" to "F19" are on MAC's full keyboard but may not exist on
|
||||
// usual keyboard. "F20" to "F24" are only available on Windows and Linux.
|
||||
// "F25" to "F35" are Linux only. Leaving "Clear" key unimplemented; it's
|
||||
// inconsistent between platforms.
|
||||
KEY(" ", Space, dom::KeyboardEvent_Binding::DOM_VK_SPACE, MODIFIER_NONE)
|
||||
KEY(",", Comma, dom::KeyboardEvent_Binding::DOM_VK_COMMA, MODIFIER_NONE)
|
||||
KEY("<", Comma, dom::KeyboardEvent_Binding::DOM_VK_COMMA, MODIFIER_SHIFT)
|
||||
@ -170,3 +171,4 @@ KEY("^", Digit6, dom::KeyboardEvent_Binding::DOM_VK_6, MODIFIER_SHIFT)
|
||||
KEY("&", Digit7, dom::KeyboardEvent_Binding::DOM_VK_7, MODIFIER_SHIFT)
|
||||
KEY("*", Digit8, dom::KeyboardEvent_Binding::DOM_VK_8, MODIFIER_SHIFT)
|
||||
KEY("(", Digit9, dom::KeyboardEvent_Binding::DOM_VK_9, MODIFIER_SHIFT)
|
||||
// clang-format on
|
||||
|
@ -270,22 +270,23 @@ static StaticRefPtr<LRUCache> sCache;
|
||||
* a secret seed, a per-timeline (context) 'mix-in', and a clamped time.
|
||||
*
|
||||
* When comparing times across different seed values: time may go backwards.
|
||||
* For a clamped time of 300, one seed may generate a midpoint of 305 and another
|
||||
* 395. So comparing an (actual) timestamp of 325 and 351 could see the 325 clamped
|
||||
* up to 400 and the 351 clamped down to 300. The seed is per-process, so this case
|
||||
* occurs when one can compare timestamps cross-process. This is uncommon (because
|
||||
* we don't have site isolation.) The circumstances this could occur are
|
||||
* BroadcastChannel, Storage Notification, and in theory (but not yet implemented)
|
||||
* SharedWorker. This should be an exhaustive list (at time of comment writing!).
|
||||
* For a clamped time of 300, one seed may generate a midpoint of 305 and
|
||||
* another 395. So comparing an (actual) timestamp of 325 and 351 could see the
|
||||
* 325 clamped up to 400 and the 351 clamped down to 300. The seed is
|
||||
* per-process, so this case occurs when one can compare timestamps
|
||||
* cross-process. This is uncommon (because we don't have site isolation.) The
|
||||
* circumstances this could occur are BroadcastChannel, Storage Notification,
|
||||
* and in theory (but not yet implemented) SharedWorker. This should be an
|
||||
* exhaustive list (at time of comment writing!).
|
||||
*
|
||||
* Aside from cross-process communication, derived timestamps across different
|
||||
* time origins may go backwards. (Specifically, derived means adding two timestamps
|
||||
* together to get an (approximate) absolute time.)
|
||||
* Assume a page and a worker. If one calls performance.now() in the page and then
|
||||
* triggers a call to performance.now() in the worker, the following invariant should
|
||||
* hold true:
|
||||
* time origins may go backwards. (Specifically, derived means adding two
|
||||
* timestamps together to get an (approximate) absolute time.)
|
||||
* Assume a page and a worker. If one calls performance.now() in the page and
|
||||
* then triggers a call to performance.now() in the worker, the following
|
||||
* invariant should hold true:
|
||||
* page.performance.timeOrigin + page.performance.now() <
|
||||
* worker.performance.timeOrigin + worker.performance.now()
|
||||
* worker.performance.timeOrigin + worker.performance.now()
|
||||
*
|
||||
* We break this invariant.
|
||||
*
|
||||
@ -304,14 +305,16 @@ static StaticRefPtr<LRUCache> sCache;
|
||||
* absolute and does not need any additional randomness.
|
||||
*
|
||||
* @param aClampedTimeUSec [in] The clamped input time in microseconds.
|
||||
* @param aResolutionUSec [in] The current resolution for clamping in microseconds.
|
||||
* @param aMidpointOut [out] The midpoint, in microseconds, between [0, aResolutionUSec].
|
||||
* @param aContextMixin [in] An opaque random value for relative timestamps. 0 for
|
||||
* absolute timestamps
|
||||
* @param aSecretSeed [in] TESTING ONLY. When provided, the current seed will be
|
||||
* replaced with this value.
|
||||
* @return A nsresult indicating success of failure. If the function failed,
|
||||
* nothing is written to aMidpointOut
|
||||
* @param aResolutionUSec [in] The current resolution for clamping in
|
||||
* microseconds.
|
||||
* @param aMidpointOut [out] The midpoint, in microseconds, between [0,
|
||||
* aResolutionUSec].
|
||||
* @param aContextMixin [in] An opaque random value for relative
|
||||
* timestamps. 0 for absolute timestamps
|
||||
* @param aSecretSeed [in] TESTING ONLY. When provided, the current seed
|
||||
* will be replaced with this value.
|
||||
* @return A nsresult indicating success of failure. If the
|
||||
* function failed, nothing is written to aMidpointOut
|
||||
*/
|
||||
|
||||
/* static */
|
||||
@ -454,25 +457,28 @@ nsRFPService::RandomMidpoint(long long aClampedTimeUSec,
|
||||
|
||||
|
||||
/**
|
||||
* Given a precision value, this function will reduce a given input time to the nearest
|
||||
* multiple of that precision.
|
||||
* Given a precision value, this function will reduce a given input time to the
|
||||
* nearest multiple of that precision.
|
||||
*
|
||||
* It will check if it is appropriate to clamp the input time according to the values
|
||||
* of the privacy.resistFingerprinting and privacy.reduceTimerPrecision preferences.
|
||||
* Note that while it will check these prefs, it will use whatever precision is given to
|
||||
* it, so if one desires a minimum precision for Resist Fingerprinting, it is the
|
||||
* caller's responsibility to provide the correct value. This means you should pass
|
||||
* TimerResolution(), which enforces a minimum vale on the precision based on
|
||||
* preferences.
|
||||
* It will check if it is appropriate to clamp the input time according to the
|
||||
* values of the privacy.resistFingerprinting and privacy.reduceTimerPrecision
|
||||
* preferences. Note that while it will check these prefs, it will use
|
||||
* whatever precision is given to it, so if one desires a minimum precision for
|
||||
* Resist Fingerprinting, it is the caller's responsibility to provide the
|
||||
* correct value. This means you should pass TimerResolution(), which enforces
|
||||
* a minimum vale on the precision based on preferences.
|
||||
*
|
||||
* It ensures the given precision value is greater than zero, if it is not it returns
|
||||
* the input time.
|
||||
* It ensures the given precision value is greater than zero, if it is not it
|
||||
* returns the input time.
|
||||
*
|
||||
* @param aTime [in] The input time to be clamped.
|
||||
* @param aTimeScale [in] The units the input time is in (Seconds, Milliseconds, or Microseconds).
|
||||
* @param aTimeScale [in] The units the input time is in (Seconds,
|
||||
* Milliseconds, or Microseconds).
|
||||
* @param aResolutionUSec [in] The precision (in microseconds) to clamp to.
|
||||
* @param aContextMixin [in] An opaque random value for relative timestamps. 0 for absolute timestamps
|
||||
* @return If clamping is appropriate, the clamped value of the input, otherwise the input.
|
||||
* @param aContextMixin [in] An opaque random value for relative timestamps.
|
||||
* 0 for absolute timestamps
|
||||
* @return If clamping is appropriate, the clamped value of the
|
||||
* input, otherwise the input.
|
||||
*/
|
||||
/* static */
|
||||
double
|
||||
|
@ -221,7 +221,8 @@ public:
|
||||
/**
|
||||
* This method for getting spoofed modifier states for the given keyboard event.
|
||||
*
|
||||
* @param aDoc [in] the owner's document for getting content language.
|
||||
* @param aDoc [in] the owner's document for getting content
|
||||
* language.
|
||||
* @param aKeyboardEvent [in] the keyboard event that needs to be spoofed.
|
||||
* @param aModifier [in] the modifier that needs to be spoofed.
|
||||
* @param aOut [out] the spoofed state for the given modifier.
|
||||
@ -235,10 +236,12 @@ public:
|
||||
/**
|
||||
* This method for getting spoofed code for the given keyboard event.
|
||||
*
|
||||
* @param aDoc [in] the owner's document for getting content language.
|
||||
* @param aDoc [in] the owner's document for getting content
|
||||
* language.
|
||||
* @param aKeyboardEvent [in] the keyboard event that needs to be spoofed.
|
||||
* @param aOut [out] the spoofed code.
|
||||
* @return true if there is a spoofed code in the fake keyboard layout.
|
||||
* @return true if there is a spoofed code in the fake keyboard
|
||||
* layout.
|
||||
*/
|
||||
static bool GetSpoofedCode(const nsIDocument* aDoc,
|
||||
const WidgetKeyboardEvent* aKeyboardEvent,
|
||||
@ -247,10 +250,12 @@ public:
|
||||
/**
|
||||
* This method for getting spoofed keyCode for the given keyboard event.
|
||||
*
|
||||
* @param aDoc [in] the owner's document for getting content language.
|
||||
* @param aDoc [in] the owner's document for getting content
|
||||
* language.
|
||||
* @param aKeyboardEvent [in] the keyboard event that needs to be spoofed.
|
||||
* @param aOut [out] the spoofed keyCode.
|
||||
* @return true if there is a spoofed keyCode in the fake keyboard layout.
|
||||
* @return true if there is a spoofed keyCode in the fake
|
||||
* keyboard layout.
|
||||
*/
|
||||
static bool GetSpoofedKeyCode(const nsIDocument* aDoc,
|
||||
const WidgetKeyboardEvent* aKeyboardEvent,
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
// clang-format off
|
||||
/*
|
||||
Hello! Are you looking at this file because you got an error you don't understand?
|
||||
Perhaps something that looks like the following?
|
||||
@ -43,6 +44,7 @@ using namespace mozilla;
|
||||
|
||||
They're supposed to be equal. They're not. But they both round to 2064.83.
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
bool setupJitter(bool enabled) {
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
@ -213,6 +215,7 @@ TEST(ResistFingerprinting, ReducePrecision_Aggressive) {
|
||||
TEST(ResistFingerprinting, ReducePrecision_JitterTestVectors) {
|
||||
bool jitterEnabled = setupJitter(true);
|
||||
|
||||
// clang-format off
|
||||
/*
|
||||
* Here's our test vector. First we set the secret to the 16 byte value
|
||||
* 0x000102030405060708 0x101112131415161718
|
||||
@ -241,6 +244,7 @@ TEST(ResistFingerprinting, ReducePrecision_JitterTestVectors) {
|
||||
* 5000: 829259d5 % 500 = 218
|
||||
* 5500: b260a4a6 % 500 = 14
|
||||
*/
|
||||
// clang-format on
|
||||
|
||||
// Set the secret
|
||||
long long throwAway;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -182,7 +182,8 @@ void AccumulateCategoricalKeyed(const nsCString& key, const nsTArray<E>& enumVal
|
||||
* be recorded.
|
||||
*
|
||||
* @param id - The histogram id.
|
||||
* @param label - A string label value that is defined in Histograms.json for this histogram.
|
||||
* @param label - A string label value that is defined in Histograms.json for
|
||||
* this histogram.
|
||||
*/
|
||||
void AccumulateCategorical(HistogramID id, const nsCString& label);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -78,7 +78,8 @@ bool CanRecordProduct(SupportedProduct aProducts);
|
||||
* Return the number of milliseconds since process start using monotonic
|
||||
* timestamps (unaffected by system clock changes).
|
||||
*
|
||||
* @return NS_OK on success, NS_ERROR_NOT_AVAILABLE if TimeStamp doesn't have the data.
|
||||
* @return NS_OK on success, NS_ERROR_NOT_AVAILABLE if TimeStamp doesn't have
|
||||
* the data.
|
||||
*/
|
||||
nsresult MsSinceProcessStart(double* aResult);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -761,7 +761,8 @@ namespace {
|
||||
*
|
||||
* @param {StaticMutexAutoLock} the proof we hold the mutex.
|
||||
* @param {Histogram} the histogram to reflect.
|
||||
* @return {nsresult} NS_ERROR_FAILURE if we fail to allocate memory for the snapshot.
|
||||
* @return {nsresult} NS_ERROR_FAILURE if we fail to allocate memory for the
|
||||
* snapshot.
|
||||
*/
|
||||
nsresult
|
||||
internal_GetHistogramAndSamples(const StaticMutexAutoLock& aLock,
|
||||
@ -912,7 +913,8 @@ internal_ShouldReflectHistogram(const StaticMutexAutoLock& aLock, base::Histogra
|
||||
* @param {aClearSubsession} whether or not to clear the data after
|
||||
* taking the snapshot.
|
||||
* @param {aIncludeGPU} whether or not to include data for the GPU.
|
||||
* @param {aOutSnapshot} the container in which the snapshot data will be stored.
|
||||
* @param {aOutSnapshot} the container in which the snapshot data will be
|
||||
* stored.
|
||||
* @return {nsresult} NS_OK if the snapshot was successfully taken or
|
||||
* NS_ERROR_OUT_OF_MEMORY if it failed to allocate memory.
|
||||
*/
|
||||
@ -1471,7 +1473,8 @@ KeyedHistogram::GetSnapshot(const StaticMutexAutoLock& aLock,
|
||||
* @param {aClearSubsession} whether or not to clear the data after
|
||||
* taking the snapshot.
|
||||
* @param {aIncludeGPU} whether or not to include data for the GPU.
|
||||
* @param {aOutSnapshot} the container in which the snapshot data will be stored.
|
||||
* @param {aOutSnapshot} the container in which the snapshot data will be
|
||||
* stored.
|
||||
* @param {aSkipEmpty} whether or not to skip empty keyed histograms from the
|
||||
* snapshot. Can't always assume "true" for consistency with the other
|
||||
* callers.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1379,8 +1379,10 @@ internal_CanRecordForScalarID(const StaticMutexAutoLock& lock,
|
||||
* @param lock Instance of a lock locking gTelemetryHistogramMutex
|
||||
* @param aId The scalar identifier.
|
||||
* @param aKeyed Are we attempting to write a keyed scalar?
|
||||
* @param aForce Whether to allow recording even if the probe is not allowed on the current process.
|
||||
* This must only be true for GeckoView persistence and recorded actions.
|
||||
* @param aForce Whether to allow recording even if the probe is not allowed on
|
||||
* the current process.
|
||||
* This must only be true for GeckoView persistence and recorded
|
||||
* actions.
|
||||
* @return ScalarResult::Ok if we can record, an error code otherwise.
|
||||
*/
|
||||
ScalarResult
|
||||
@ -1446,9 +1448,9 @@ internal_GetEnumByScalarName(const StaticMutexAutoLock& lock,
|
||||
* @param lock Instance of a lock locking gTelemetryHistogramMutex
|
||||
* @param aId The scalar identifier.
|
||||
* @param aProcessStorage This drives the selection of the map to use to store
|
||||
* the scalar data coming from child processes. This is only meaningful when
|
||||
* this function is called in parent process. If that's the case, if
|
||||
* this is not |GeckoProcessType_Default|, the process id is used to
|
||||
* the scalar data coming from child processes. This is only meaningful
|
||||
* when this function is called in parent process. If that's the case,
|
||||
* if this is not |GeckoProcessType_Default|, the process id is used to
|
||||
* allocate and store the scalars.
|
||||
* @param aRes The output variable that stores scalar object.
|
||||
* @return
|
||||
@ -1763,14 +1765,14 @@ namespace {
|
||||
* @param lock Instance of a lock locking gTelemetryHistogramMutex
|
||||
* @param aId The scalar identifier.
|
||||
* @param aProcessStorage This drives the selection of the map to use to store
|
||||
* the scalar data coming from child processes. This is only meaningful when
|
||||
* this function is called in parent process. If that's the case, if
|
||||
* this is not |GeckoProcessType_Default|, the process id is used to
|
||||
* the scalar data coming from child processes. This is only meaningful
|
||||
* when this function is called in parent process. If that's the case,
|
||||
* if this is not |GeckoProcessType_Default|, the process id is used to
|
||||
* allocate and store the scalars.
|
||||
* @param aRet The output variable that stores scalar object.
|
||||
* @return
|
||||
* NS_ERROR_INVALID_ARG if the scalar id is unknown or a this is a keyed string
|
||||
* scalar.
|
||||
* NS_ERROR_INVALID_ARG if the scalar id is unknown or a this is a keyed
|
||||
* string scalar.
|
||||
* NS_ERROR_NOT_AVAILABLE if the scalar is expired.
|
||||
* NS_OK if the scalar was found. If that's the case, aResult contains a
|
||||
* valid pointer to a scalar type.
|
||||
@ -2006,7 +2008,8 @@ internal_RegisterScalars(const StaticMutexAutoLock& lock,
|
||||
* @param {aScalarsToReflect} The table that will contain the snapshot.
|
||||
* @param {aDataset} The dataset we're asking the snapshot for.
|
||||
* @param {aProcessStorage} The scalar storage to take a snapshot of.
|
||||
* @param {aIsBuiltinDynamic} Whether or not the storage is for dynamic builtin scalars.
|
||||
* @param {aIsBuiltinDynamic} Whether or not the storage is for dynamic builtin
|
||||
* scalars.
|
||||
* @return NS_OK or the error code describing the failure reason.
|
||||
*/
|
||||
nsresult
|
||||
@ -2065,7 +2068,8 @@ internal_ScalarSnapshotter(const StaticMutexAutoLock& aLock,
|
||||
* @param {aScalarsToReflect} The table that will contain the snapshot.
|
||||
* @param {aDataset} The dataset we're asking the snapshot for.
|
||||
* @param {aProcessStorage} The scalar storage to take a snapshot of.
|
||||
* @param {aIsBuiltinDynamic} Whether or not the storage is for dynamic builtin scalars.
|
||||
* @param {aIsBuiltinDynamic} Whether or not the storage is for dynamic builtin
|
||||
* scalars.
|
||||
* @return NS_OK or the error code describing the failure reason.
|
||||
*/
|
||||
nsresult
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -61,7 +61,8 @@ void UpdateChildScalars(Telemetry::ProcessID aProcessType,
|
||||
/**
|
||||
* Update keyed scalars for the given process type with the data coming from child process.
|
||||
*
|
||||
* @param aProcessType - the process type to process the keyed scalar actions for
|
||||
* @param aProcessType - the process type to process the keyed scalar actions
|
||||
* for
|
||||
* @param aScalarActions - actions to update the keyed scalar data
|
||||
*/
|
||||
void UpdateChildKeyedScalars(Telemetry::ProcessID aProcessType,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -127,7 +127,8 @@ private:
|
||||
* Get the path to the Android Data dir.
|
||||
*
|
||||
* @param {nsTString<PathChar>} aOutDir - the variable holding the path.
|
||||
* @return {nsresult} NS_OK if the data dir path was found, a failure value otherwise.
|
||||
* @return {nsresult} NS_OK if the data dir path was found, a failure value
|
||||
* otherwise.
|
||||
*/
|
||||
nsresult
|
||||
GetAndroidDataDir(nsTString<PathChar>& aOutDir)
|
||||
@ -148,8 +149,10 @@ GetAndroidDataDir(nsTString<PathChar>& aOutDir)
|
||||
/**
|
||||
* Get the path to the persistence file in the Android Data dir.
|
||||
*
|
||||
* @param {nsCOMPtr<nsIFile>} aOutFile - the nsIFile pointer holding the file info.
|
||||
* @return {nsresult} NS_OK if the persistence file was found, a failure value otherwise.
|
||||
* @param {nsCOMPtr<nsIFile>} aOutFile - the nsIFile pointer holding the file
|
||||
* info.
|
||||
* @return {nsresult} NS_OK if the persistence file was found, a failure value
|
||||
* otherwise.
|
||||
*/
|
||||
nsresult
|
||||
GetPersistenceFile(nsCOMPtr<nsIFile>& aOutFile)
|
||||
@ -173,7 +176,8 @@ GetPersistenceFile(nsCOMPtr<nsIFile>& aOutFile)
|
||||
*
|
||||
* @param {nsCOMPtr<nsIFile>} aFile - the nsIFile handle to the file.
|
||||
* @param {nsACString} fileContent - the content of the file.
|
||||
* @return {nsresult} NS_OK if the file was correctly read, an error code otherwise.
|
||||
* @return {nsresult} NS_OK if the file was correctly read, an error code
|
||||
* otherwise.
|
||||
*/
|
||||
nsresult
|
||||
ReadFromFile(const nsCOMPtr<nsIFile>& aFile, nsACString& fileContent)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -100,14 +100,13 @@ Atomic<bool> sShutdownNotified;
|
||||
PRThread* CreateSystemThread(void (*start)(void* arg),
|
||||
void* arg)
|
||||
{
|
||||
PRThread* thread = PR_CreateThread(
|
||||
PR_SYSTEM_THREAD, /* This thread will not prevent the process from terminating */
|
||||
start,
|
||||
arg,
|
||||
PR_PRIORITY_LOW,
|
||||
PR_GLOBAL_THREAD /* Make sure that the thread is never cooperatively scheduled */,
|
||||
PR_UNJOINABLE_THREAD,
|
||||
0 /* Use default stack size */
|
||||
PRThread* thread =
|
||||
PR_CreateThread(PR_SYSTEM_THREAD, /* This thread will not prevent the
|
||||
process from terminating */
|
||||
start, arg, PR_PRIORITY_LOW,
|
||||
PR_GLOBAL_THREAD, /* Make sure that the thread is never
|
||||
cooperatively scheduled */
|
||||
PR_UNJOINABLE_THREAD, 0 /* Use default stack size */
|
||||
);
|
||||
MOZ_LSAN_INTENTIONALLY_LEAK_OBJECT(thread); // This pointer will never be deallocated.
|
||||
return thread;
|
||||
|
@ -91,7 +91,8 @@ CopySections(const unsigned char *data, PIMAGE_NT_HEADERS old_headers, PMEMORYMO
|
||||
if (section->SizeOfRawData) {
|
||||
memcpy(dest, data + section->PointerToRawData, section->SizeOfRawData);
|
||||
}
|
||||
// section->Misc.PhysicalAddress = (POINTER_TYPE) module->remoteCodeBase + section->VirtualAddress;
|
||||
// section->Misc.PhysicalAddress = (POINTER_TYPE) module->remoteCodeBase +
|
||||
// section->VirtualAddress;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,8 +118,10 @@ find_key(const char *keyList, char* key)
|
||||
*
|
||||
* @param path Path to the .ini file to read
|
||||
* @param keyList List of zero-delimited keys ending with two zero characters
|
||||
* @param numStrings Number of strings to read into results buffer - must be equal to the number of keys
|
||||
* @param results Two-dimensional array of strings to be filled in the same order as the keys provided
|
||||
* @param numStrings Number of strings to read into results buffer - must be
|
||||
* equal to the number of keys
|
||||
* @param results Two-dimensional array of strings to be filled in the same
|
||||
* order as the keys provided
|
||||
* @param section Optional name of the section to read; defaults to "Strings"
|
||||
*/
|
||||
int
|
||||
|
@ -2052,9 +2052,9 @@ static SystemRedirection gSystemRedirections[] = {
|
||||
RR_WriteOptionalBufferFixedSize<1, PATH_MAX>>> },
|
||||
|
||||
// By passing through events when initializing the sandbox, we ensure both
|
||||
// that we actually initialize the process sandbox while replaying as well as
|
||||
// while recording, and that any activity in these calls does not interfere
|
||||
// with the replay.
|
||||
// that we actually initialize the process sandbox while replaying as well
|
||||
// as while recording, and that any activity in these calls does not
|
||||
// interfere with the replay.
|
||||
{ "sandbox_init", nullptr, Preamble_PassThrough },
|
||||
{ "sandbox_init_with_parameters", nullptr, Preamble_PassThrough },
|
||||
|
||||
|
@ -114,7 +114,8 @@ nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
|
||||
/* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */
|
||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID \
|
||||
{ 0x0fa3158c, 0xd5a7, 0x43de, \
|
||||
{0x91, 0x81, 0xa2, 0x85, 0xe7, 0x4c, 0xf1, 0xd4 } }
|
||||
|
||||
|
@ -517,7 +517,8 @@ nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
|
||||
return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult);
|
||||
}
|
||||
|
||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
|
||||
/* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */
|
||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID \
|
||||
{ 0x0fa3158c, 0xd5a7, 0x43de, \
|
||||
{0x91, 0x81, 0xa2, 0x85, 0xe7, 0x4c, 0xf1, 0xd4 } }
|
||||
|
||||
|
@ -19,9 +19,10 @@ namespace system {
|
||||
namespace windowsDHCPClient {
|
||||
|
||||
//
|
||||
// The comments on this page reference the following Microsoft documentation pages (both retrieved 2017-06-27)
|
||||
// [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365915(v=vs.85).aspx
|
||||
// [2] https://msdn.microsoft.com/en-us/library/windows/desktop/aa363298(v=vs.85).aspx
|
||||
// The comments on this page reference the following Microsoft documentation
|
||||
// pages (both retrieved 2017-06-27)
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365915(v=vs.85).aspx
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa363298(v=vs.85).aspx
|
||||
mozilla::LazyLogModule gDhcpUtilsLog("dhcpUtils");
|
||||
|
||||
#undef LOG
|
||||
|
@ -72,7 +72,8 @@ nsWindowsDHCPClient::GetOption(uint8_t aOption, nsACString& aRetVal)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define NS_WINDOWSDHCPCLIENTSERVICE_CID /* {FEBF1D69-4D7D-4891-9524-045AD18B5592} */\
|
||||
/* {FEBF1D69-4D7D-4891-9524-045AD18B5592} */
|
||||
#define NS_WINDOWSDHCPCLIENTSERVICE_CID \
|
||||
{ 0xFEBF1D69, 0x4D7D, 0x4891, \
|
||||
{0x95, 0x24, 0x04, 0x5a, 0xd1, 0x8b, 0x55, 0x92 } }
|
||||
|
||||
@ -100,4 +101,4 @@ NSMODULE_DEFN(nsDHCPClientModule) = &kSysDHCPClientModule;
|
||||
} // namespace windowsDHCPClient
|
||||
} // namespace system
|
||||
} // namespace toolkit
|
||||
} // namespace mozilla
|
||||
} // namespace mozilla
|
||||
|
@ -273,7 +273,8 @@ nsWindowsSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define NS_WINDOWSSYSTEMPROXYSERVICE_CID /* 4e22d3ea-aaa2-436e-ada4-9247de57d367 */\
|
||||
/* 4e22d3ea-aaa2-436e-ada4-9247de57d367 */
|
||||
#define NS_WINDOWSSYSTEMPROXYSERVICE_CID \
|
||||
{ 0x4e22d3ea, 0xaaa2, 0x436e, \
|
||||
{0xad, 0xa4, 0x92, 0x47, 0xde, 0x57, 0xd3, 0x67 } }
|
||||
|
||||
|
@ -231,9 +231,11 @@ void glxtest()
|
||||
if (length >= bufsize)
|
||||
fatal_error("GL strings length too large for buffer size");
|
||||
|
||||
///// Clean up. Indeed, the parent process might fail to kill us (e.g. if it doesn't need to check GL info)
|
||||
///// so we might be staying alive for longer than expected, so it's important to consume as little memory as
|
||||
///// possible. Also we want to check that we're able to do that too without generating X errors.
|
||||
///// Clean up. Indeed, the parent process might fail to kill us (e.g. if it
|
||||
///// doesn't need to check GL info) so we might be staying alive for longer
|
||||
///// than expected, so it's important to consume as little memory as
|
||||
///// possible. Also we want to check that we're able to do that too without
|
||||
///// generating X errors.
|
||||
glXMakeCurrent(dpy, None, nullptr); // must release the GL context before destroying it
|
||||
glXDestroyContext(dpy, context);
|
||||
XDestroyWindow(dpy, window);
|
||||
|
@ -366,13 +366,13 @@ private:
|
||||
// {
|
||||
// "schema":
|
||||
// {
|
||||
// "stack": 0, /* index into stackTable */
|
||||
// "time": 1, /* number */
|
||||
// "responsiveness": 2, /* number */
|
||||
// "stack": 0, /* index into stackTable */
|
||||
// "time": 1, /* number */
|
||||
// "responsiveness": 2, /* number */
|
||||
// },
|
||||
// "data":
|
||||
// [
|
||||
// [ 1, 0.0, 0.0 ] /* { stack: 1, time: 0.0, responsiveness: 0.0 } */
|
||||
// [ 1, 0.0, 0.0 ] /* { stack: 1, time: 0.0, responsiveness: 0.0 } */
|
||||
// ]
|
||||
// },
|
||||
//
|
||||
@ -380,13 +380,13 @@ private:
|
||||
// {
|
||||
// "schema":
|
||||
// {
|
||||
// "name": 0, /* index into stringTable */
|
||||
// "time": 1, /* number */
|
||||
// "data": 2 /* arbitrary JSON */
|
||||
// "name": 0, /* index into stringTable */
|
||||
// "time": 1, /* number */
|
||||
// "data": 2 /* arbitrary JSON */
|
||||
// },
|
||||
// "data":
|
||||
// [
|
||||
// [ 3, 0.1 ] /* { name: 'example marker', time: 0.1 } */
|
||||
// [ 3, 0.1 ] /* { name: 'example marker', time: 0.1 } */
|
||||
// ]
|
||||
// },
|
||||
//
|
||||
@ -394,13 +394,13 @@ private:
|
||||
// {
|
||||
// "schema":
|
||||
// {
|
||||
// "prefix": 0, /* index into stackTable */
|
||||
// "frame": 1 /* index into frameTable */
|
||||
// "prefix": 0, /* index into stackTable */
|
||||
// "frame": 1 /* index into frameTable */
|
||||
// },
|
||||
// "data":
|
||||
// [
|
||||
// [ null, 0 ], /* (root) */
|
||||
// [ 0, 1 ] /* (root) > foo.js */
|
||||
// [ null, 0 ], /* (root) */
|
||||
// [ 0, 1 ] /* (root) > foo.js */
|
||||
// ]
|
||||
// },
|
||||
//
|
||||
@ -408,17 +408,18 @@ private:
|
||||
// {
|
||||
// "schema":
|
||||
// {
|
||||
// "location": 0, /* index into stringTable */
|
||||
// "implementation": 1, /* index into stringTable */
|
||||
// "optimizations": 2, /* arbitrary JSON */
|
||||
// "line": 3, /* number */
|
||||
// "column": 4, /* number */
|
||||
// "category": 5 /* number */
|
||||
// "location": 0, /* index into stringTable */
|
||||
// "implementation": 1, /* index into stringTable */
|
||||
// "optimizations": 2, /* arbitrary JSON */
|
||||
// "line": 3, /* number */
|
||||
// "column": 4, /* number */
|
||||
// "category": 5 /* number */
|
||||
// },
|
||||
// "data":
|
||||
// [
|
||||
// [ 0 ], /* { location: '(root)' } */
|
||||
// [ 1, 2 ] /* { location: 'foo.js', implementation: 'baseline' } */
|
||||
// [ 0 ], /* { location: '(root)' } */
|
||||
// [ 1, 2 ] /* { location: 'foo.js',
|
||||
// implementation: 'baseline' } */
|
||||
// ]
|
||||
// },
|
||||
//
|
||||
@ -448,18 +449,19 @@ private:
|
||||
// "sample_groups:
|
||||
// [
|
||||
// {
|
||||
// "id": 42, /* number (thread id, or object identifier (tab), etc) */
|
||||
// "id": 42, /* number (thread id, or object identifier (tab), etc) */
|
||||
// "samples:
|
||||
// {
|
||||
// "schema":
|
||||
// {
|
||||
// "time": 1, /* number */
|
||||
// "number": 2, /* number (of times the counter was touched) */
|
||||
// "count": 3 /* number (total for the counter) */
|
||||
// "time": 1, /* number */
|
||||
// "number": 2, /* number (of times the counter was touched) */
|
||||
// "count": 3 /* number (total for the counter) */
|
||||
// },
|
||||
// "data":
|
||||
// [
|
||||
// [ 0.1, 1824, 454622 ] /* { time: 0.1, number: 1824, count: 454622 } */
|
||||
// [ 0.1, 1824,
|
||||
// 454622 ] /* { time: 0.1, number: 1824, count: 454622 } */
|
||||
// ]
|
||||
// },
|
||||
// },
|
||||
|
@ -264,7 +264,8 @@ void profiler_shutdown();
|
||||
// selected options. Stops and restarts the profiler if it is already active.
|
||||
// After starting the profiler is "active". The samples will be recorded in a
|
||||
// circular buffer.
|
||||
// "aCapacity" is the maximum number of entries in the profiler's circular buffer.
|
||||
// "aCapacity" is the maximum number of entries in the profiler's circular
|
||||
// buffer.
|
||||
// "aInterval" the sampling interval, measured in millseconds.
|
||||
// "aFeatures" is the feature set. Features unsupported by this
|
||||
// platform/configuration are ignored.
|
||||
@ -823,8 +824,9 @@ public:
|
||||
Push(sProfilingStack.get(), aLabel, aDynamicString, aCategory, aFlags);
|
||||
}
|
||||
|
||||
// This is the AUTO_PROFILER_LABEL_FAST variant. It retrieves the ProfilingStack
|
||||
// from the JSContext and does nothing if the profiler is inactive.
|
||||
// This is the AUTO_PROFILER_LABEL_FAST variant. It retrieves the
|
||||
// ProfilingStack from the JSContext and does nothing if the profiler is
|
||||
// inactive.
|
||||
AutoProfilerLabel(JSContext* aJSContext,
|
||||
const char* aLabel, const char* aDynamicString,
|
||||
js::ProfilingStackFrame::Category aCategory,
|
||||
|
@ -28,16 +28,18 @@ typedef mozilla::Atomic<uint64_t, mozilla::MemoryOrdering::Relaxed> ProfilerAtom
|
||||
|
||||
// Counter support
|
||||
// There are two types of counters:
|
||||
// 1) a simple counter which can be added to or subtracted from. This could track the number
|
||||
// of objects of a type, the number of calls to something (reflow, JIT, etc).
|
||||
// 2) a combined counter which has the above, plus a number-of-calls counter that is
|
||||
// incremented by 1 for each call to modify the count. This provides an optional source for
|
||||
// a 'heatmap' of access. This can be used (for example) to track the amount of memory
|
||||
// allocated, and provide a heatmap of memory operations (allocs/frees).
|
||||
// 1) a simple counter which can be added to or subtracted from. This could
|
||||
// track the number of objects of a type, the number of calls to something
|
||||
// (reflow, JIT, etc).
|
||||
// 2) a combined counter which has the above, plus a number-of-calls counter
|
||||
// that is incremented by 1 for each call to modify the count. This provides
|
||||
// an optional source for a 'heatmap' of access. This can be used (for
|
||||
// example) to track the amount of memory allocated, and provide a heatmap of
|
||||
// memory operations (allocs/frees).
|
||||
//
|
||||
// Counters are sampled by the profiler once per sample-period. At this time, all counters
|
||||
// are global to the process. In the future, there might be more versions with per-thread
|
||||
// or other discriminators.
|
||||
// Counters are sampled by the profiler once per sample-period. At this time,
|
||||
// all counters are global to the process. In the future, there might be more
|
||||
// versions with per-thread or other discriminators.
|
||||
//
|
||||
// Typical usage:
|
||||
// There are two ways to use counters: With heap-created counter objects,
|
||||
@ -55,13 +57,18 @@ typedef mozilla::Atomic<uint64_t, mozilla::MemoryOrdering::Relaxed> ProfilerAtom
|
||||
//
|
||||
// PROFILER_DEFINE_COUNT_TOTAL(mything, "JIT", "Some JIT byte count")
|
||||
// ...
|
||||
// void foo() { ... AUTO_PROFILER_COUNT_TOTAL(mything, number_of_bytes_generated); ... }
|
||||
// void foo() {
|
||||
// ...
|
||||
// AUTO_PROFILER_COUNT_TOTAL(mything, number_of_bytes_generated);
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// To use without statics/macros:
|
||||
//
|
||||
// UniquePtr<ProfilerCounter> myCounter;
|
||||
// ...
|
||||
// myCounter = MakeUnique<ProfilerCounter>("mything", "JIT", "Some JIT byte count"));
|
||||
// myCounter =
|
||||
// MakeUnique<ProfilerCounter>("mything", "JIT", "Some JIT byte count"));
|
||||
// ...
|
||||
// void foo() { ... myCounter->Add(number_of_bytes_generated0; ... }
|
||||
|
||||
|
@ -102,7 +102,8 @@ NS_IMETHODIMP ProxyHandlerInfo::GetDefaultDescription(nsAString & aDefaultDescri
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); */
|
||||
/* void launchWithURI (in nsIURI aURI,
|
||||
[optional] in nsIInterfaceRequestor aWindowContext); */
|
||||
NS_IMETHODIMP ProxyHandlerInfo::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -37,8 +37,10 @@ public:
|
||||
nsACString& aMIMEType) override;
|
||||
|
||||
// GetFileTokenForPath must be implemented by each platform.
|
||||
// platformAppPath --> a platform specific path to an application that we got out of the
|
||||
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
|
||||
// platformAppPath --> a platform specific path to an application that we got
|
||||
// out of the rdf data source. This can be a mac file
|
||||
// spec, a unix path or a windows path depending on the
|
||||
// platform
|
||||
// aFile --> an nsIFile representation of that platform application path.
|
||||
virtual MOZ_MUST_USE nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile) override;
|
||||
|
||||
|
@ -37,8 +37,10 @@ public:
|
||||
NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override;
|
||||
|
||||
// GetFileTokenForPath must be implemented by each platform.
|
||||
// platformAppPath --> a platform specific path to an application that we got out of the
|
||||
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
|
||||
// platformAppPath --> a platform specific path to an application that we got
|
||||
// out of the rdf data source. This can be a mac file
|
||||
// spec, a unix path or a windows path depending on the
|
||||
// platform
|
||||
// aFile --> an nsIFile representation of that platform application path.
|
||||
virtual nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile) override;
|
||||
|
||||
|
@ -351,10 +351,10 @@ public:
|
||||
/**
|
||||
* Called to indicate that the z-index of a view has been changed.
|
||||
* The z-index is relative to all siblings of the view.
|
||||
* @param aAuto Indicate that the z-index of a view is "auto". An "auto" z-index
|
||||
* means that the view does not define a new stacking context,
|
||||
* which means that the z-indicies of the view's children are
|
||||
* relative to the view's siblings.
|
||||
* @param aAuto Indicate that the z-index of a view is "auto". An "auto"
|
||||
* z-index means that the view does not define a new stacking
|
||||
* context, which means that the z-indicies of the view's
|
||||
* children are relative to the view's siblings.
|
||||
* @param zindex new z depth
|
||||
*/
|
||||
void SetZIndex(bool aAuto, int32_t aZIndex);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user