Skip to content

Commit

Permalink
XMLHttpRequest-abort() sets the state to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Jul 3, 2021
1 parent 34aa27d commit 5d42992
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 227 deletions.
9 changes: 9 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

<body>
<release version="2.51.0" date="June xx, 2021" description="Bugfixes, Firefox 89, Chrome/Edge 91, JS Template support">
<action type="fix" dev="rbri" issue="365">
XMLHttpRequest-abort() sets the state to 0.
</action>
<action type="fix" dev="RhinoTeam">
core-js: Various fixes for undefined.
</action>
<action type="fix" dev="RhinoTeam">
core-js: Support ES2019 JSON superset.
</action>
<action type="fix" dev="RhinoTeam">
core-js: globalThis implemented.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public XMLHttpRequest(final boolean caseSensitiveProperties) {
* @param state the new state
*/
private void setState(final int state) {
if (state == OPENED
if (state == UNSENT
|| state == OPENED
|| state == HEADERS_RECEIVED
|| state == LOADING
|| state == DONE) {
Expand Down Expand Up @@ -375,6 +376,8 @@ public void abort() {
fireJavascriptEvent(Event.TYPE_READY_STATE_CHANGE);
fireJavascriptEvent(Event.TYPE_ABORT);
fireJavascriptEvent(Event.TYPE_LOAD_END);

setState(UNSENT);
aborted_ = true;
}

Expand Down
Loading

0 comments on commit 5d42992

Please sign in to comment.