Closed Bug 1651402 Opened 4 years ago Closed 4 years ago

Switch devtools to use Debugger.Object.isError instead of .class

Categories

(DevTools :: Console, task)

task

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: evilpie, Assigned: nchevobbe)

References

Details

Attachments

(2 files)

We want to change the JSClass name for error objects to be more specific. So instead of just "Error" we would use "TypeError" etc. This seems to break devtools, which just checks for .class == "Error" in some cases.

I made a try push that should show these failures. What you would probably need to do is replace code like this with result?.isError. (I am not 100% sure if result is actually a Debugger.Object, but get the idea)

Thanks for filing this Tom.
I'll pull your patch and investigate the different failures it causes

Component: General → Console

This patch has all the required work on the SpiderMonkey side.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90d1f5107d9f
Change Error JSClass names r=anba
https://hg.mozilla.org/integration/autoland/rev/6ac9edc64fe5
Use obj.isError instead of obj.class='Error' in DevTools code. r=davidwalsh
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
See Also: → 1665154
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: