☠☠ backed out by 0f4b97c32ba0 ☠ ☠ | |
author | Jean-Yves Avenard <jyavenard@mozilla.com> |
Tue, 09 Jun 2020 07:24:23 +0000 | |
changeset 598695 | 7f7b983390650cbc7d736e92fd3e1f629a30ac02 |
parent 598694 | 32fba417ebd01dfb2c2a392cdb1fad7ef66e96e8 |
child 598696 | b6b48c37ab0c3312af42c8fd165ff1510ac53842 |
push id | 13310 |
push user | ffxbld-merge |
push date | Mon, 29 Jun 2020 14:50:06 +0000 |
treeherder | mozilla-beta@15a59a0afa5c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1641737 |
milestone | 79.0a1 |
first release with | nightly linux32
7f7b98339065
/
79.0a1
/
20200609151649
/
files
nightly linux64
7f7b98339065
/
79.0a1
/
20200609151649
/
files
nightly mac
7f7b98339065
/
79.0a1
/
20200609151649
/
files
nightly win32
7f7b98339065
/
79.0a1
/
20200609151649
/
files
nightly win64
7f7b98339065
/
79.0a1
/
20200609151649
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
79.0a1
/
20200609151649
/
pushlog to previous
nightly linux64
79.0a1
/
20200609151649
/
pushlog to previous
nightly mac
79.0a1
/
20200609151649
/
pushlog to previous
nightly win32
79.0a1
/
20200609151649
/
pushlog to previous
nightly win64
79.0a1
/
20200609151649
/
pushlog to previous
|
netwerk/ipc/DocumentLoadListener.cpp | file | annotate | diff | comparison | revisions | |
netwerk/ipc/ParentProcessDocumentChannel.cpp | file | annotate | diff | comparison | revisions |
--- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp @@ -522,16 +522,19 @@ auto DocumentLoadListener::Open( } if (auto* ctx = GetBrowsingContext()) { ctx->StartDocumentLoad(this); } *aRv = NS_OK; mOpenPromise = new OpenPromise::Private(__func__); + // We make the promise use direct task dispatch in order to reduce the number + // of event loops iterations. + mOpenPromise->UseDirectTaskDispatch(__func__); return mOpenPromise; } /* static */ bool DocumentLoadListener::OpenFromParent( dom::CanonicalBrowsingContext* aBrowsingContext, nsDocShellLoadState* aLoadState, uint64_t aOuterWindowId, uint32_t* aOutIdent) {
--- a/netwerk/ipc/ParentProcessDocumentChannel.cpp +++ b/netwerk/ipc/ParentProcessDocumentChannel.cpp @@ -61,16 +61,19 @@ ParentProcessDocumentChannel::RedirectTo NS_ASSERTION(false, msg.get()); return RedirectToRealChannelPromise::CreateAndResolve( NS_ERROR_CONTENT_BLOCKED, __func__); } } mStreamFilterEndpoints = std::move(aStreamFilterEndpoints); RefPtr<RedirectToRealChannelPromise> p = mPromise.Ensure(__func__); + // We make the promise use direct task dispatch in order to reduce the number + // of event loops iterations. + mPromise.UseDirectTaskDispatch(__func__); nsresult rv = gHttpHandler->AsyncOnChannelRedirect(this, channel, aRedirectFlags); if (NS_FAILED(rv)) { LOG( ("ParentProcessDocumentChannel RedirectToRealChannel " "AsyncOnChannelRedirect failed [this=%p " "aRv=%d]", @@ -171,28 +174,32 @@ NS_IMETHODIMP ParentProcessDocumentChann // RedirectToRealChannelPromise given as parameter. RefPtr<RedirectToRealChannelPromise> p = self->RedirectToRealChannel( std::move(aResolveValue.mStreamFilterEndpoints), aResolveValue.mRedirectFlags, aResolveValue.mLoadFlags) ->Then( GetCurrentThreadSerialEventTarget(), __func__, [self](RedirectToRealChannelPromise::ResolveOrRejectValue&& - aValue) { + aValue) -> RefPtr<RedirectToRealChannelPromise> { MOZ_ASSERT(aValue.IsResolve()); nsresult rv = aValue.ResolveValue(); if (NS_FAILED(rv)) { self->DisconnectChildListeners(rv, rv); } self->mLoadGroup = nullptr; self->mListener = nullptr; self->mCallbacks = nullptr; self->RemoveObserver(); - return RedirectToRealChannelPromise:: - CreateAndResolveOrReject(std::move(aValue), __func__); + auto p = + MakeRefPtr<RedirectToRealChannelPromise::Private>( + __func__); + p->UseDirectTaskDispatch(__func__); + p->ResolveOrReject(std::move(aValue), __func__); + return p; }); // We chain the promise the DLL is waiting on to the one returned by // RedirectToRealChannel. As soon as the promise returned is // resolved or rejected, so will the DLL's promise. p->ChainTo(aResolveValue.mPromise.forget(), __func__); }, [self](DocumentLoadListener::OpenPromiseFailedType&& aRejectValue) { self->DisconnectChildListeners(aRejectValue.mStatus,