Closed
Bug 1088125
Opened 10 years ago
Closed 9 years ago
Make CrashSubmit.submit return a Promise
Categories
(Toolkit :: Crash Reporting, defect)
Toolkit
Crash Reporting
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: poiru, Assigned: poiru)
References
Details
Attachments
(2 files, 2 obsolete files)
2.06 KB,
patch
|
gfritzsche
:
review+
|
Details | Diff | Splinter Review |
10.88 KB,
patch
|
gfritzsche
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•9 years ago
|
||
This particular return value is used in crashes.js, but it is not strictly neccessary as the submitError callback is called in all cases.
Attachment #8543672 -
Flags: review?(gfritzsche)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8543673 -
Flags: review?(gfritzsche)
Assignee | ||
Comment 3•9 years ago
|
||
Sorry for the delay.
Attachment #8543674 -
Flags: review?(gfritzsche)
Comment 4•9 years ago
|
||
Thanks, i will take a look this week, but i can't tell yet when exactly.
Comment 5•9 years ago
|
||
Sorry for the long delay, we had a work-week and i didn't get to my request queue. I think these patches would be much easier to look at if they were just one part (e.g. you stop returning a value from submit() in part 1, then add a return again in part 3).
Comment 6•9 years ago
|
||
Comment on attachment 8543674 [details] [diff] [review] Part 3: Make CrashSubmit.submit return a Promise Review of attachment 8543674 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, only smaller issues here :) ::: toolkit/crashreporter/CrashSubmit.jsm @@ +206,5 @@ > + > + this.promise = new Promise((resolve, reject) => { > + this.resolvePromise = resolve; > + this.rejectPromise = reject; > + }); Lets use PromiseUtils.defer() here. ::: toolkit/crashreporter/content/crashes.js @@ +20,3 @@ > function submitPendingReport(event) { > var link = event.target; > var id = link.firstChild.textContent; Lets make those |let| while we are here.
Attachment #8543674 -
Flags: review?(gfritzsche) → feedback+
Updated•9 years ago
|
Attachment #8543672 -
Flags: review?(gfritzsche)
Updated•9 years ago
|
Attachment #8543672 -
Flags: feedback+
Comment 7•9 years ago
|
||
Comment on attachment 8543673 [details] [diff] [review] Part 2: Use arrow function instead of using separate 'self' variable Review of attachment 8543673 [details] [diff] [review]: ----------------------------------------------------------------- This looks good and is easy to review as a separate patch. For patch 1 and 3, i'd rather see them folded together though.
Attachment #8543673 -
Flags: review?(gfritzsche) → review+
Comment 8•9 years ago
|
||
Do we have test coverage for CrashSubmit yet? Have you checked whether all the tests run through?
Assignee | ||
Comment 9•9 years ago
|
||
Comment 5 and 6 addressed. (In reply to Georg Fritzsche [:gfritzsche] from comment #8) > Do we have test coverage for CrashSubmit yet? We do, indirectly. E.g. the checks added in bug 1061821 ensure that submission through CrashSubmit works as expected. > Have you checked whether all the tests run through? Yep, try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=dbf0eef6960b
Attachment #8543672 -
Attachment is obsolete: true
Attachment #8543674 -
Attachment is obsolete: true
Attachment #8558345 -
Flags: review?(gfritzsche)
Comment 10•9 years ago
|
||
CrashSubmit.jsm gets tested by way of about:crashes here: https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js (It submits to a JSM in httpd.js.)
Comment 11•9 years ago
|
||
Comment on attachment 8558345 [details] [diff] [review] Part 1: Make CrashSubmit.submit return a Promise Review of attachment 8558345 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, this looks good. ::: toolkit/crashreporter/CrashSubmit.jsm @@ +411,2 @@ > } > + return this.deferredSubmit.promise; This seems redundant, lets just remove the first of the two returns here.
Attachment #8558345 -
Flags: review?(gfritzsche) → review+
Assignee | ||
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6bfd511db87 https://hg.mozilla.org/integration/mozilla-inbound/rev/9d91dfe3f657 https://treeherder.mozilla.org/#/jobs?repo=try&revision=855002dd12a6
Comment 13•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c6bfd511db87 https://hg.mozilla.org/mozilla-central/rev/9d91dfe3f657
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•