зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1777218 - Remove unused XMLHTTPRequestMainThread::SetRequestObserver() r=manuel
Remove unused XMLHTTPRequestMainThread::SetRequestObserver() in code Differential Revision: https://phabricator.services.mozilla.com/D167347
This commit is contained in:
Родитель
34ec504f65
Коммит
68d6709804
|
@ -187,7 +187,6 @@ XMLHttpRequestMainThread::XMLHttpRequestMainThread(
|
|||
: XMLHttpRequest(aGlobalObject),
|
||||
mResponseBodyDecodedPos(0),
|
||||
mResponseType(XMLHttpRequestResponseType::_empty),
|
||||
mRequestObserver(nullptr),
|
||||
mState(XMLHttpRequest_Binding::UNSENT),
|
||||
mFlagSynchronous(false),
|
||||
mFlagAborted(false),
|
||||
|
@ -215,7 +214,6 @@ XMLHttpRequestMainThread::XMLHttpRequestMainThread(
|
|||
mLoadTransferred(0),
|
||||
mIsSystem(false),
|
||||
mIsAnon(false),
|
||||
mFirstStartRequestSeen(false),
|
||||
mInLoadProgressEvent(false),
|
||||
mResultJSON(JS::UndefinedValue()),
|
||||
mArrayBufferBuilder(new ArrayBufferBuilder()),
|
||||
|
@ -329,11 +327,6 @@ void XMLHttpRequestMainThread::ResetResponse() {
|
|||
mEofDecoded = false;
|
||||
}
|
||||
|
||||
void XMLHttpRequestMainThread::SetRequestObserver(
|
||||
nsIRequestObserver* aObserver) {
|
||||
mRequestObserver = aObserver;
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(XMLHttpRequestMainThread)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(XMLHttpRequestMainThread,
|
||||
|
@ -1820,10 +1813,6 @@ XMLHttpRequestMainThread::OnStartRequest(nsIRequest* request) {
|
|||
AUTO_PROFILER_LABEL("XMLHttpRequestMainThread::OnStartRequest", NETWORK);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (!mFirstStartRequestSeen && mRequestObserver) {
|
||||
mFirstStartRequestSeen = true;
|
||||
mRequestObserver->OnStartRequest(request);
|
||||
}
|
||||
|
||||
if (request != mChannel) {
|
||||
// Can this still happen?
|
||||
|
@ -2103,12 +2092,6 @@ XMLHttpRequestMainThread::OnStopRequest(nsIRequest* request, nsresult status) {
|
|||
|
||||
mWaitingForOnStopRequest = false;
|
||||
|
||||
if (mRequestObserver) {
|
||||
NS_ASSERTION(mFirstStartRequestSeen, "Inconsistent state!");
|
||||
mFirstStartRequestSeen = false;
|
||||
mRequestObserver->OnStopRequest(request, status);
|
||||
}
|
||||
|
||||
// make sure to notify the listener if we were aborted
|
||||
// XXX in fact, why don't we do the cleanup below in this case??
|
||||
// UNSENT is for abort calls. See OnStartRequest above.
|
||||
|
|
|
@ -431,8 +431,6 @@ class XMLHttpRequestMainThread final : public XMLHttpRequest,
|
|||
const ProgressEventType aType, int64_t aLoaded,
|
||||
int64_t aTotal);
|
||||
|
||||
void SetRequestObserver(nsIRequestObserver* aObserver);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
|
||||
XMLHttpRequestMainThread, XMLHttpRequest)
|
||||
virtual bool IsCertainlyAliveForCC() const override;
|
||||
|
@ -643,8 +641,6 @@ class XMLHttpRequestMainThread final : public XMLHttpRequest,
|
|||
nsCOMPtr<nsIChannelEventSink> mChannelEventSink;
|
||||
nsCOMPtr<nsIProgressEventSink> mProgressEventSink;
|
||||
|
||||
nsIRequestObserver* mRequestObserver;
|
||||
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
|
||||
|
@ -731,7 +727,6 @@ class XMLHttpRequestMainThread final : public XMLHttpRequest,
|
|||
*/
|
||||
void CloseRequestWithError(const ProgressEventType aType);
|
||||
|
||||
bool mFirstStartRequestSeen;
|
||||
bool mInLoadProgressEvent;
|
||||
|
||||
nsCOMPtr<nsIAsyncVerifyRedirectCallback> mRedirectCallback;
|
||||
|
|
Загрузка…
Ссылка в новой задаче