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

NEW
Unassigned

Status

P3
normal
2 years ago
8 months ago

People

(Reporter: 684sigma, Unassigned)

Tracking

({regression})

53 Branch
regression

Firefox Tracking Flags

(firefox-esr45 unaffected, firefox53 unaffected, firefox54 unaffected, firefox55 fix-optional)

Details

(Whiteboard: [todo-mr][t2])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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
(Reporter)

Updated

2 years ago
See Also: → bug 1360076
(Reporter)

Updated

2 years ago
Has STR: --- → yes
Keywords: regression
(Reporter)

Comment 1

2 years ago
Created attachment 8862260 [details]
event listener shows wrong JavaScript code, by reporter.zip

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
    }

Updated

2 years ago
status-firefox53: --- → unaffected
status-firefox54: --- → unaffected
status-firefox55: --- → affected
status-firefox-esr45: --- → unaffected
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.
status-firefox55: affected → fix-optional
DevTools bug triage (filter on CLIMBING SHOES).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Filter on HOTFROG.
Whiteboard: [todo-mr] → [todo-mr][t2]

Updated

8 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.