the Browser Console fails to format a certain exception object

RESOLVED INVALID

Status

RESOLVED INVALID
4 years ago
6 days ago

People

(Reporter: als, Unassigned)

Tracking

35 Branch
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8555913 [details]
main.js and mod.js

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150108202552

Steps to reproduce:

Create a new add-on with "cfx init". Define the files lib/main.js and lib/mod.js as attached. Run the add-on with "cfx run".


Actual results:

The following was printed on stdout

console.error: bug:                         
  Message: TypeError: redeclaration of variable foo
  Stack:                                           
    @resource://jid1-q6dxvpen78gnba-at-jetpack/bug/lib/mod.js:6:NaN
CuddlefishLoader/options<.load@resource://gre/modules/commonjs/sdk/loader/cuddlefish.js:129:18
@resource://jid1-q6dxvpen78gnba-at-jetpack/bug/lib/main.js:3:14                               
CuddlefishLoader/options<.load@resource://gre/modules/commonjs/sdk/loader/cuddlefish.js:129:18
run@resource://gre/modules/commonjs/sdk/addon/runner.js:145:19                                
startup/</<@resource://gre/modules/commonjs/sdk/addon/runner.js:86:7                          
Handler.prototype.process@resource://gre/modules/Promise-backend.js:865:23                    
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:744:7                 

The Browser Console shows 

Object { , 5 more… } runner.js:164
Object { , 5 more… } Promise-backend.js:868





Expected results:

The exception object should have been formatted in the Browser Console as something like

"TypeError: redeclaration of variable foo"        mod.js:6
Component: Untriaged → Developer Tools: Console
Flags: firefox-backlog?

Updated

6 months ago
Product: Firefox → DevTools
Flags: firefox-backlog?
Hello als,

Is this still an issue? The console was rewritten some time ago and maybe we got rid of this bug in the meantime.
Flags: needinfo?(als)
(Reporter)

Comment 2

6 days ago
The browser console now reports:

SyntaxError: redeclaration of let foo           mod.js:6:8
note: Previously declared at line 5, column 8   mod.js:5:8

So the problem is fixed.
Flags: needinfo?(als)
Thanks for checking so quickly!
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 days ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.