Open Bug 1174133 Opened 9 years ago Updated 2 years ago

Error objects should provide different fileName/columnNumber/lineNumber to different consumers

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

Tracking Status
firefox41 --- affected

People

(Reporter: bzbarsky, Unassigned)

Details

Specifically, a content exception that got thrown from chrome code (e.g. via new contentWindow.Error) should show the content code that was on the stack at the time (if any) when viewed from content and the chrome code when viewed from chrome.  That's how DOMException works.

This probably requires making fileName/lineNumber/columnNumber accessors instead of slots and having them read from the saved stack if one is present instead of from the filename/line/column stored in the JSErrorReport.

It also requires at least fixing the self-hosting treatment in saved stacks (see bug 1173638 comment 1 item 1).
These properties are non-standard, right? Chrome doesn't have them. Therefore, there shouldn't be too many web compat issues, and we are free to change them to accessor properties without Breaking The Web?
I doubt it'll be that easy, but feel free to try.
Didn't realize other UAs did not support these.

That does make it easier to do whatever the heck we want for now and then if people ever want to standardize these to push back on attempts to make them value props.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.