Closed
Bug 1309483
Opened 8 years ago
Closed 8 years ago
console.clear() no longer working
Categories
(DevTools :: Console, defect)
Tracking
(firefox52 fixed)
RESOLVED
FIXED
Firefox 52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: mahks1, Assigned: jdescottes)
References
Details
Attachments
(1 file)
console.clear()
52.0a1 not working
50.0b6 not working
50.0b3 works fine
Assignee | ||
Comment 2•8 years ago
|
||
If you close and reopen the console after calling console.clear(), the console will be effectively cleared.
Most likely linked to the new console frontend that was enabled recently. If I switch back to the old console by flipping the devtools.webconsole.new-frontend-enabled pref, console.clear() works as expected.
Updated•8 years ago
|
Assignee: nobody → chevobbe.nicolas
Assignee | ||
Comment 3•8 years ago
|
||
I can also see an error in the browser console when trying to call console.clear():
> notify event 'consoleAPICall' threw an exception: TypeError: action.message is undefined
> Stack: NewConsoleOutputWrapper.prototype.dispatchMessageAdd@resource://gre/modules/commonjs/toolkit/loader.js ->
> resource://devtools/client/webconsole/new-console-output/new-console-output-wrapper.js:77:11
This looks like a regression from Bug 1304178 which changed new-console-output-wrapper::dispatchMessageAdd.
This method expects action.message.get("id") to work for any type of action, but it fails on BATCH_ACTION types.
Also when running `npm test` in the webconsole, we have 44 tests failing with error messages such as "TypeError: {something}.includes is not a function"
Assignee | ||
Comment 4•8 years ago
|
||
Nicolas: FWIW, locally looks like simply checking if action.message exists before doing action.message.get("id") fixes the issue.
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8800153 [details]
Bug 1309483 - fix dispatchMessageAdd failing for BATCH_ACTIONS;
https://reviewboard.mozilla.org/r/85156/#review83738
Thanks so much for the catch and the fix, Julian.
Our end-to-end coverage is unfortunately limited at the moment (many existing tests can't be reused because they depended on internal mechanisms) and this happened to fall in the slice of the system that we can only test end-to-end.
I went ahead and triggered a try build. The fix looks good to me, so I'm going to go ahead and steal the review so we can land it when it turns green. Nicolas, feel free to give additional review if you want to.
Attachment #8800153 -
Flags: review+
Pushed by lclark@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e488db50cc3b
fix dispatchMessageAdd failing for BATCH_ACTIONS;r=linclark
Assignee | ||
Comment 8•8 years ago
|
||
Great, thanks for the review Lin!
And for the record the `npm test` failures I mentioned were due to an outdated node version in my dev env.
Assignee | ||
Updated•8 years ago
|
Assignee: chevobbe.nicolas → jdescottes
Status: NEW → ASSIGNED
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8800153 [details]
Bug 1309483 - fix dispatchMessageAdd failing for BATCH_ACTIONS;
https://reviewboard.mozilla.org/r/85156/#review83886
LGTM
Attachment #8800153 -
Flags: review?(chevobbe.nicolas) → review+
Comment 10•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Comment 11•8 years ago
|
||
I have reproduced this bug with Nightly 52.0a1 (2016-10-12) (64-bit) on Windows 7 , 64 Bit !
This bug'a fix is verified with latest Nightly
This bug's fix is verified with latest Nightly
Build ID : 20161018030211
User Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
[bugday-20161019]
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•