Bug 66680 - Line numbers of Errors are too high in scripts containing objects that define getters
Summary: Line numbers of Errors are too high in scripts containing objects that define...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.6
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-08-22 10:14 PDT by Nate Whetsell
Modified: 2012-02-04 08:29 PST (History)
1 user (show)

See Also:

Test case (550 bytes, text/html)
2011-08-22 10:14 PDT, Nate Whetsell
no flags Details
Test case (951 bytes, text/html)
2012-01-08 11:21 PST, Nate Whetsell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Whetsell 2011-08-22 10:14:25 PDT
Created attachment 104690 [details]
Test case

If a file contains a script like

DummyClass = function() {};
DummyClass.prototype = {
    get dummyGetter() { return null; }

and then throw an Error, the Error's line number property will be too high.

I've attached a simple test case to show this behavior.

This is probably related to (and may even be a duplicate of) bug #59926, but I'm reporting it as a new bug because the attached test doesn't require the Web Inspector's debugger.
Comment 1 Nate Whetsell 2012-01-08 11:21:32 PST
Created attachment 121583 [details]
Test case

Updating test case so that it produces more readable results in Chrome and Firefox.
Comment 2 Nate Whetsell 2012-02-04 08:29:21 PST
This was fixed in changeset 106589 <http://trac.webkit.org/changeset/106589> for bug #77675.