Closed Bug 987048 Opened 11 years ago Closed 8 years ago

console.count() toString issues are attributed to "System JS" with no filename/line number

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [fuzzblocker])

Attachments

(2 files)

Attached file testcase 1 (deleted) —
System JS : ERROR (null):0 - Function.prototype.toString called on incompatible object
Attached file testcase 2 (deleted) —
System JS : ERROR (null):0 - ({0:{}, 1:{}, 2:{}, 3:{}, 4:{}}) is not a function
Like bug 978618, this will make it hard for me to know if I come across a new bug.
Whiteboard: [fuzzblocker]
There's some big refactoring that needs to happen for error reporting before anyone does any specific fixes for stuff like this.
Depends on: 981187
Yeah, the issue is that console does the toString async, not when you make the count() call, and does it from C++ code.  And in C++, for that matter.  So what were you expecting for the filename/lineno given that?

Really, this case should probably just silently do nothing or something.  There's a ClearException on the stack, but since JS is not running the JS engine decides to report the exception instead of setting a pending one or something, I guess.

In any case, we should first figure out what the right behavior is at all when ToString() throws an exception in count().  If only we had a spec here...
We no longer report an exception here.  We just report a count with "no label" as the label.  Probably fixed when we moved AutoJSAPI to always take ownership of error reporting.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: