Open Bug 1360075 Opened 7 years ago Updated 2 years ago

Anonymous/XUL inspection: sometimes event listener popup shows wrong JavaScript code from bindings

Categories

(DevTools :: Inspector, defect, P3)

53 Branch
defect

Tracking

(firefox-esr45 unaffected, firefox53 unaffected, firefox54 unaffected)

Tracking Status
firefox-esr45 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected

People

(Reporter: 684sigma, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [todo-mr][t2])

Attachments

(1 file)

I noticed an issue in Beta 53. It also happens in Nightly 55. Doesn't happen in Beta 52, ESR 45.
Sometimes event listener tooltips display wrong JavaScript code. Here's how to reproduce the bug:

1. Open https://www.w3schools.com/html/mov_bbb.mp4
2. Open inspector, click on event listener button near <video> tag.
3. Open 'canplay' event listener

Result: The code displayed in event listener tooltip is broken. The first line: 'function t---- > " + aEvent.type);'
Expected: The code should be normal
See Also: → 1360076
Has STR: --- → yes
Keywords: regression
1. Create pref dom.allow_XUL_XBL_for_file as true.
2. Open attached .html page
3. Open inspector, click on event listener button near <test> tag
4. Open 'click' event handler

Result: The code displayed in event listener tooltip is broken. This is how it looks in Nightly 55
    function efault(); // long comment long comment long comment
    });
    console.log('constructo

Expected: The code should be normal
    function(event) {
      event.preventDefault(); // long comment long comment long comment
    }
Gabriel, should this block the 55 release?
Flags: needinfo?(gl)
Mike, can you assist here? I don't think this should be a 55 release blocker, but I need the final judgement up to you as well.
Flags: needinfo?(gl) → needinfo?(mratcliffe)
100% not a blocker... I will add it to my todo list though as I plan on looking into using sourcemaps for React code in these popups anyhow.
Flags: needinfo?(mratcliffe)
Whiteboard: [todo-mr]
To be clear, some listeners are displayed worse and some better but on the whole it is improved.

It obviously needs more work though.
Thanks Mike, Gabriel -- I'll mark as fix-optional for 55.
DevTools bug triage (filter on CLIMBING SHOES).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Filter on HOTFROG.
Whiteboard: [todo-mr] → [todo-mr][t2]
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: