зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6d15abc6e768 (bug 1907885) for causing build bustages in nsHttpChannel.cpp CLOSED TREE
This commit is contained in:
Родитель
89400fa5b5
Коммит
9d9e2d7aae
|
@ -493,12 +493,6 @@ void HttpChannelChild::OnStartRequest(
|
|||
SetCookie(aArgs.cookie());
|
||||
}
|
||||
|
||||
// Note: this is where we would notify "http-on-after-examine-response"
|
||||
// observers. We have deliberately disabled this for child processes (see bug
|
||||
// 806753)
|
||||
//
|
||||
// gHttpHandler->OnAfterExamineResponse(this);
|
||||
|
||||
if (aArgs.shouldWaitForOnStartRequestSent() &&
|
||||
!mRecvOnStartRequestSentCalled) {
|
||||
LOG((" > pending DoOnStartRequest until RecvOnStartRequestSent\n"));
|
||||
|
|
|
@ -2617,23 +2617,11 @@ nsresult nsHttpChannel::ContinueProcessResponse1() {
|
|||
LOG((" continuation state has been reset"));
|
||||
}
|
||||
|
||||
gHttpHandler->OnAfterExamineResponse(this);
|
||||
|
||||
// No process switch needed, continue as normal.
|
||||
return ContinueProcessResponse2(rv);
|
||||
}
|
||||
|
||||
nsresult nsHttpChannel::ContinueProcessResponse2(nsresult rv) {
|
||||
if (mSuspendCount) {
|
||||
LOG(("Waiting until resume to finish processing response [this=%p]\n",
|
||||
this));
|
||||
mCallOnResume = [rv](nsHttpChannel* self) {
|
||||
self->ContinueProcessResponse2(rv);
|
||||
return NS_OK;
|
||||
};
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv) && !mCanceled) {
|
||||
// The process switch failed, cancel this channel.
|
||||
Cancel(rv);
|
||||
|
|
|
@ -394,11 +394,6 @@ class nsHttpHandler final : public nsIHttpProtocolHandler,
|
|||
NotifyObservers(chan, NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC);
|
||||
}
|
||||
|
||||
// Called by the channel once the cookie processing is completed.
|
||||
void OnAfterExamineResponse(nsIHttpChannel* chan) {
|
||||
NotifyObservers(chan, NS_HTTP_ON_AFTER_EXAMINE_RESPONSE_TOPIC);
|
||||
}
|
||||
|
||||
// Called by the channel once headers have been merged with cached headers
|
||||
void OnExamineMergedResponse(nsIHttpChannel* chan) {
|
||||
NotifyObservers(chan, NS_HTTP_ON_EXAMINE_MERGED_RESPONSE_TOPIC);
|
||||
|
|
|
@ -183,13 +183,6 @@ interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
|
|||
*/
|
||||
#define NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC "http-on-examine-response"
|
||||
|
||||
/**
|
||||
* This notification is triggered after the examination of the response header.
|
||||
* The observer of this topic can interrogate the response. The "subject" of
|
||||
* the notification is the nsIHttpChannel instance.
|
||||
*/
|
||||
#define NS_HTTP_ON_AFTER_EXAMINE_RESPONSE_TOPIC "http-on-after-examine-response"
|
||||
|
||||
/**
|
||||
* The observer of this topic is notified after the received HTTP response
|
||||
* is merged with data from the browser cache. This means that, among other
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[set-cookie-after-clear-all.https.html]
|
||||
[Setting a cookie after Clear-Site-Data for all shouldn't allow the cookie to take.]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[set-cookie-after-clear-cookies.https.html]
|
||||
[Setting a cookie after Clear-Site-Data for cookies shouldn't allow the cookie to take.]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[set-cookie-before-clear-all.https.html]
|
||||
[Setting a cookie before Clear-Site-Data for all shouldn't allow the cookie to take.]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[set-cookie-before-clear-cookies.https.html]
|
||||
[Setting a cookie before Clear-Site-Data for cookies shouldn't allow the cookie to take.]
|
||||
expected: FAIL
|
|
@ -99,7 +99,7 @@ void ClearSiteData::Initialize() {
|
|||
return;
|
||||
}
|
||||
|
||||
obs->AddObserver(service, NS_HTTP_ON_AFTER_EXAMINE_RESPONSE_TOPIC, false);
|
||||
obs->AddObserver(service, NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC, false);
|
||||
obs->AddObserver(service, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
gClearSiteData = service;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ void ClearSiteData::Shutdown() {
|
|||
return;
|
||||
}
|
||||
|
||||
obs->RemoveObserver(service, NS_HTTP_ON_AFTER_EXAMINE_RESPONSE_TOPIC);
|
||||
obs->RemoveObserver(service, NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC);
|
||||
obs->RemoveObserver(service, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ ClearSiteData::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!strcmp(aTopic, NS_HTTP_ON_AFTER_EXAMINE_RESPONSE_TOPIC));
|
||||
MOZ_ASSERT(!strcmp(aTopic, NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC));
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> channel = do_QueryInterface(aSubject);
|
||||
if (NS_WARN_IF(!channel)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче