Bug 5206

Summary: Parse errors report incorrect line numbers, or none at all
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: JavaScriptCoreAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, dglazkov, eric, ian, webkit.review.bot
Priority: P2 Keywords: HasReduction, InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Test1
none
Test1
none
Test2
none
Test2
none
Test 1 (corrected)
none
Test 2 (corrected)
none
Add Tests Patch v1
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-04
none
Add Tests Patch v2 none

Geoffrey Garen
Reported 2005-09-30 13:21:52 PDT
I've attached two testcases, which both fail on TOT. One problem is that syntax errors return with a line number that's relative to the current parsing unit instead of the current file. One step toward fixing this would be to change the && test to an || test in setExceptionDetailsIfNeeded. That would cause exception information for syntax errors to be (re)set by the enclosing node. But that really just begs the question of why we set the information incorrectly to begin with. So I think a better solution would be to change our code so that it only sets the information if it has valid data with which to do so.
Attachments
Test1 (44 bytes, text/javascript)
2005-09-30 13:22 PDT, Geoffrey Garen
no flags
Test1 (82 bytes, text/html)
2005-09-30 13:22 PDT, Geoffrey Garen
no flags
Test2 (21 bytes, text/javascript)
2005-09-30 13:23 PDT, Geoffrey Garen
no flags
Test2 (83 bytes, text/html)
2005-09-30 13:24 PDT, Geoffrey Garen
no flags
Test 1 (corrected) (94 bytes, text/html)
2008-05-02 14:20 PDT, David Kilzer (:ddkilzer)
no flags
Test 2 (corrected) (94 bytes, text/html)
2008-05-02 14:21 PDT, David Kilzer (:ddkilzer)
no flags
Add Tests Patch v1 (4.84 KB, patch)
2012-06-19 17:00 PDT, David Kilzer (:ddkilzer)
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-04 (533.78 KB, application/zip)
2012-06-19 20:28 PDT, WebKit Review Bot
no flags
Add Tests Patch v2 (6.27 KB, patch)
2012-06-20 09:39 PDT, David Kilzer (:ddkilzer)
no flags
Geoffrey Garen
Comment 1 2005-09-30 13:22:38 PDT
Geoffrey Garen
Comment 2 2005-09-30 13:22:58 PDT
Geoffrey Garen
Comment 3 2005-09-30 13:23:49 PDT
Geoffrey Garen
Comment 4 2005-09-30 13:24:06 PDT
David Kilzer (:ddkilzer)
Comment 5 2008-05-02 14:20:16 PDT
Created attachment 20930 [details] Test 1 (corrected)
David Kilzer (:ddkilzer)
Comment 6 2008-05-02 14:21:09 PDT
Created attachment 20931 [details] Test 2 (corrected)
David Kilzer (:ddkilzer)
Comment 7 2008-05-02 14:24:07 PDT
Still happens with WebKit nightly build r32778 on Mac OS X 10.5.x Leopard with Safari 3.1.1.
David Kilzer (:ddkilzer)
Comment 8 2008-05-02 14:26:01 PDT
Pam Greene (IRC:pamg)
Comment 9 2008-12-02 16:59:20 PST
A layout test for what looks like the same issue is proposed in bug 22608, and will need new expected results when this is fixed.
David Kilzer (:ddkilzer)
Comment 10 2012-06-19 13:45:49 PDT
(In reply to comment #5) > Created an attachment (id=20930) [details] > Test 1 (corrected) This test case still does not report a line number with WebKit nightly build r120705, so it's not fixed yet. (In reply to comment #6) > Created an attachment (id=20931) [details] > Test 2 (corrected) This test case reports a correct file and line number as of WebKit nightly build r120705, so it is fixed. (Likely fixed by Bug 62613.)
David Kilzer (:ddkilzer)
Comment 11 2012-06-19 13:52:56 PDT
Note that <rdar://problem/5907896> was used to represent the fix for Bug 62613, so I will file a new radar for the remaining test case that's not fixed: Test 1 (corrected) (Attachment 20930 [details]).
David Kilzer (:ddkilzer)
Comment 12 2012-06-19 17:00:17 PDT
Created attachment 148462 [details] Add Tests Patch v1
WebKit Review Bot
Comment 13 2012-06-19 20:28:40 PDT
Comment on attachment 148462 [details] Add Tests Patch v1 Attachment 148462 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12998097 New failing tests: fast/js/parse-error-external-script-in-new-Function.html fast/js/parse-error-external-script-in-eval.html
WebKit Review Bot
Comment 14 2012-06-19 20:28:44 PDT
Created attachment 148493 [details] Archive of layout-test-results from ec2-cr-linux-04 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-04 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
David Kilzer (:ddkilzer)
Comment 15 2012-06-20 09:39:01 PDT
Created attachment 148585 [details] Add Tests Patch v2
Eric Seidel (no email)
Comment 16 2012-08-01 15:48:06 PDT
Comment on attachment 148585 [details] Add Tests Patch v2 LGTM.
Eric Seidel (no email)
Comment 17 2013-01-04 00:47:56 PST
Looks like this got forgotten?
WebKit Commit Bot
Comment 18 2013-05-08 09:32:48 PDT
Comment on attachment 148585 [details] Add Tests Patch v2 Clearing flags on attachment: 148585 Committed r149743: <http://trac.webkit.org/changeset/149743>
WebKit Commit Bot
Comment 19 2013-05-08 09:32:51 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.