mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1088125 - Part 2: Use arrow function instead of separate 'self' variable. r=gfritzsche
This commit is contained in:
parent
8b72b69f8d
commit
f6a99b47cd
@ -298,29 +298,28 @@ Submitter.prototype = {
|
||||
let manager = Services.crashmanager;
|
||||
let submissionID = manager.generateSubmissionID();
|
||||
|
||||
let self = this;
|
||||
xhr.addEventListener("readystatechange", function (aEvt) {
|
||||
xhr.addEventListener("readystatechange", (evt) => {
|
||||
if (xhr.readyState == 4) {
|
||||
let ret =
|
||||
xhr.status == 200 ? parseKeyValuePairs(xhr.responseText) : {};
|
||||
let submitted = !!ret.CrashID;
|
||||
|
||||
if (self.recordSubmission) {
|
||||
if (this.recordSubmission) {
|
||||
let result = submitted ? manager.SUBMISSION_RESULT_OK :
|
||||
manager.SUBMISSION_RESULT_FAILED;
|
||||
manager.addSubmissionResult(self.id, submissionID, new Date(),
|
||||
manager.addSubmissionResult(this.id, submissionID, new Date(),
|
||||
result);
|
||||
if (submitted) {
|
||||
manager.setRemoteCrashID(self.id, ret.CrashID);
|
||||
manager.setRemoteCrashID(this.id, ret.CrashID);
|
||||
}
|
||||
}
|
||||
|
||||
if (submitted) {
|
||||
self.submitSuccess(ret);
|
||||
this.submitSuccess(ret);
|
||||
}
|
||||
else {
|
||||
self.notifyStatus(FAILED);
|
||||
self.cleanup();
|
||||
this.notifyStatus(FAILED);
|
||||
this.cleanup();
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
Loading…
Reference in New Issue
Block a user