Closed Bug 1265775 Opened 9 years ago Closed 9 years ago

replace uses of Cu.reportError

Categories

(DevTools :: Framework, enhancement, P1)

enhancement

Tracking

(firefox49 fixed)

RESOLVED FIXED
Firefox 49
Iteration:
49.2 - May 23
Tracking Status
firefox49 --- fixed

People

(Reporter: tromey, Assigned: jlong)

References

Details

(Whiteboard: [devtools-html])

Attachments

(2 files, 2 obsolete files)

Replace Cu.reportError uses in devtools for de-chrome-ification project.
Severity: normal → enhancement
Whiteboard: [devtools-html]
Note also bug 1179970 (wontfix, but for the other direction); and bug 877389 (for the rest of the browser).
Maybe .catch(Cu.reportError) can use .catch(console.error), though many places in the tree use .catch(e => console.error(e)), leading us to wonder about "this" binding.
:ochameau points out: <ochameau> tromey: hey! about you comment on console.log. try console.log.apply(null, ["plop"]) in a webpage, it will throw <ochameau> tromey: the console in modules may be bound, but not the one in documents <ochameau> tromey: so it is better to assume it is not bound, as we may use console api from tools document scope Given this I think there are some existing latent bugs where something like .then(null, console.error) is used.
One option here is to use ThreadSafeDevToolsUtils.reportException
Assignee: nobody → jlong
Status: NEW → ASSIGNED
Iteration: --- → 49.1 - May 9
Flags: qe-verify-
Priority: -- → P1
Attached patch 1265775.patch (obsolete) — Splinter Review
Initial pass
Attached patch 1265775.patch (obsolete) — Splinter Review
Rebased on top of fx-team
Attachment #8748265 - Attachment is obsolete: true
Attached patch 1265775.patchSplinter Review
Attachment #8748270 - Attachment is obsolete: true
Attachment #8749244 - Flags: review?(ttromey)
Comment on attachment 8749244 [details] [diff] [review] 1265775.patch Review of attachment 8749244 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Thank you for doing this.
Attachment #8749244 - Flags: review?(ttromey) → review+
I still need to replace any instances in the devtools/shared directory.
Keywords: leave-open
Fairly small patch. I ignored a few places that clearly won't be loaded in the client, like Loaders.jsm
Attachment #8750449 - Flags: review?(ttromey)
Comment on attachment 8750449 [details] [diff] [review] 1265775-shared.patch Review of attachment 8750449 [details] [diff] [review]: ----------------------------------------------------------------- Thank you. This patch looks good to me. I am perhaps mildly worried about testing it. For the most part I think it's not worth worrying about; but for example the previous transport.js code made me wonder if something unusual is going on there.
Attachment #8750449 - Flags: review?(ttromey) → review+
Keywords: leave-open
Will push this once the tree opens
Iteration: 49.1 - May 9 → 49.2 - May 23
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Blocks: 1276347
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: