This edits the third party SCTP library, but upstream has already applied this change to master
MozReview-Commit-ID: ERpMc8EvYZ7
--HG--
extra : rebase_source : cea0d3758275b73a395ad2738edd8eb57c833e1a
This moves URI creation from ParseMetaDataEntry into SetupPrediction
because ParseMetaDataEntry is called in way more circumstances than we
actually need the URI from. Even in those cases where we might use the
URI (but it's not guaranteed), we end up using the URI less often than
we create one. In case it wasn't clear, SetupPrediction is the only
thing called post-ParseMetaDataEntry that would require a parsed URI in
the first place.
SetupPrediction has the duplicated NS_NewURI calls to avoid creating
URIs for those calls to SetupPrediction that are no-ops.
MozReview-Commit-ID: HlhVj7p2uuk
--HG--
extra : rebase_source : 0349dc52225b6e93150947ea978f2ba7afa3e2f5
This is straightforward, with only two notable things.
- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
throughout, because all nsXPIDLString.h did was include nsString.h. The
exception is for files which already include nsString.h, in which case the
patch just removes the nsXPIDLString.h inclusion.
- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
cover some of its ground, e.g. testing Adopt(nullptr).
--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
These are all straightforward except for InternalLoadEvent::mTypeHint, which
requires a bit of care to preserve existing behaviour.
--HG--
extra : rebase_source : 9b152122b011cf49b9acccdc98b4693548b8bdd2
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.
--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
NS_AsyncCopy aborts if it receives an NS_BASE_STREAM_WOULD_BLOCK error result
during copying and it is unable to QI the source stream to an
nsIAsyncInputStream. IPCBlobInputStream can return this, especially if it's:
- A freshly created aggregate stream as part of form submission of a type=file
where the Blob will come from the parent because of the file picker but the
stream is being uploaded from the child.
- A ServiceWorker is involved, causing
HttpBaseChannel::EnsureUploadStreamIsCloneable to trigger an NS_AsyncCopy
very early in the process.
IPCBlobInputStream implements nsIAsyncInputStream, and nsMultiplexInputStream
does too (conditionally based on its child streams; if any are async, it takes
step to uniformly expose async behavior). However, due to lack of sufficient
test coverage, nsMIMEInputStream did not get fixed as part of bug 1361443 when
nsMultiplexInputStream gained its nsIAsyncInputStream powers. We address that
here in the same fashion.
Part 1 of this series addresses the test coverage issue.
--HG--
extra : rebase_source : 1cae03a314397b159c3985d97231c1e34cd5f079
This patch is mainly to add a probe to measure sw launch time. To do this, this
patch records the sw launch time when the sw is just spwaned and it's ready to
handle the incoming fetch event.
MozReview-Commit-ID: 3w5MNyhQNnd
--HG--
extra : rebase_source : 3228213d0ea6be1d23b9c49382f1f8d3c2f358f1
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is null checked. The patch uses IsVoid() to replace
the null checks (and get() and EqualsLiteral() calls to replace any implicit
conversions).
--HG--
extra : rebase_source : 484ad42a7816b34b86afbe072e04ba131c1619c6
Most of these fields are not using any nsXPIDLCString-specific features.
The exceptions are mUserAgentOverride and mDefaultSocketType, which require a
little more care.
--HG--
extra : rebase_source : 50d2178b7bf10f6076fe27f2e65a4b63f1153590
The existing functions work with C strings but almost all the call sites use
Mozilla strings.
The replacement function has the following properties.
- It works with Mozilla strings, which makes it much simpler and also improves
the call sites.
- It appends to the destination string because that's what a lot of the call
sites need. For those that don't, we can just append to an empty string.
- It is declared outside the |extern "C"| section because there is no need for
it to be in that section.
Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.
The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.
--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
This patch removes the ability to select which protocols you want
included in necko, a wholly untested configuration that is broken in
practice. We have no need of this kind of configurability in necko.
In addition, this removes the final vestiges of rtsp support, which was
originally removed in bug 1295885 but still had some stuff hanging
around behind some ifdefs (that were never true).
MozReview-Commit-ID: KOEaDmit2IL
--HG--
extra : rebase_source : f6c2fdb972aaba46e922cda801252dc953550b94
netwerk/protocol/gio/nsGIOProtocolHandler.cpp:89:10: warning: 'return' will never be executed [-Wunreachable-code-return]
This `return NS_ERROR_FAILURE` statement at the end of this function is unreachable because all of the preceding switch statement's cases return.
MozReview-Commit-ID: 3qDu2IqTPrW
--HG--
extra : rebase_source : bcd8a07eee82b60fc071787ccb7df7d9f45d0679
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).
In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:
Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.
Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.
There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.
The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.
One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.
MozReview-Commit-ID: 9Evtr9oIJvx