Closed Bug 753996 Opened 13 years ago Closed 6 years ago

Functions are inconsistently unwrapped for error messages

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sfink, Unassigned)

Details

(Whiteboard: [js:p3])

When throwing an Error whose message contains the name of a function, the JS engine calls js_ValueToFunction to produce the function name to include in the message. js_ValueToFunction does not unwrap its argument. So if the function is actually a wrapper, then js_ValueToFunction will throw a TypeError ("X is not a function"). Confusingly, this TypeError uses the decompiler, which *will* unwrap the object to get the wrapped function name out, so the final error will look something like "SomeFunction() is not a function".) Either neither or both should unwrap.
Whiteboard: [js:p3]
Assignee: general → nobody

We've fixed this in various ways by now.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.