Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D116081
This commit is contained in:
Edgar Chen 2021-05-28 21:12:13 +00:00
parent 18ac9679bb
commit 7b47184b2c
4 changed files with 2 additions and 5 deletions

View File

@ -298,7 +298,6 @@ const ErrorCodes = {
NS_ERROR_DOM_MALFORMED_URI: 0x805303f8,
NS_ERROR_DOM_INVALID_HEADER_NAME: 0x805303f9,
NS_ERROR_DOM_INVALID_STATE_XHR_HAS_INVALID_CONTEXT: 0x805303fa,
NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED: 0x805303fb,
NS_ERROR_DOM_JS_DECODING_ERROR: 0x80530402,
NS_ERROR_DOM_IMAGE_INACTIVE_DOCUMENT: 0x80530403,
NS_ERROR_DOM_IMAGE_INVALID_REQUEST: 0x80530404,

View File

@ -138,7 +138,6 @@ DOM4_MSG_DEF(SyntaxError, "Invalid header name.", NS_ERROR_DOM_INVALID_HEADER_NA
/* XMLHttpRequest errors. */
DOM4_MSG_DEF(InvalidStateError, "XMLHttpRequest has an invalid context.", NS_ERROR_DOM_INVALID_STATE_XHR_HAS_INVALID_CONTEXT)
DOM4_MSG_DEF(InvalidStateError, "XMLHttpRequest state must be OPENED.", NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED)
/* Image decode errors. */
DOM4_MSG_DEF(EncodingError, "Node bound to inactive document.", NS_ERROR_DOM_IMAGE_INACTIVE_DOCUMENT)

View File

@ -2897,7 +2897,7 @@ void XMLHttpRequestMainThread::SendInternal(const BodyExtractorBase* aBody,
// Step 1
if (mState != XMLHttpRequest_Binding::OPENED) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED);
aRv.ThrowInvalidStateError("XMLHttpRequest state must be OPENED.");
return;
}
@ -3106,7 +3106,7 @@ void XMLHttpRequestMainThread::SetRequestHeader(const nsACString& aName,
// Step 1
if (mState != XMLHttpRequest_Binding::OPENED) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED);
aRv.ThrowInvalidStateError("XMLHttpRequest state must be OPENED.");
return;
}

View File

@ -714,7 +714,6 @@ with modules["DOM"]:
errors["NS_ERROR_DOM_INVALID_HEADER_NAME"] = FAILURE(1017)
errors["NS_ERROR_DOM_INVALID_STATE_XHR_HAS_INVALID_CONTEXT"] = FAILURE(1018)
errors["NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED"] = FAILURE(1019)
# When manipulating the bytecode cache with the JS API, some transcoding
# errors, such as a different bytecode format can cause failures of the