Bug 87558 - Some Content Security Policy console messages are missing line numbers in JSC
Summary: Some Content Security Policy console messages are missing line numbers in JSC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, MakingBotsRed
Depends on:
Blocks:
 
Reported: 2012-05-25 18:32 PDT by Stephanie Lewis
Modified: 2012-05-29 17:25 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.09 KB, patch)
2012-05-29 02:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.42 KB, patch)
2012-05-29 02:59 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephanie Lewis 2012-05-25 18:32:53 PDT
Regression from http://trac.webkit.org/projects/webkit/changeset/118585.

Two test fail on Lion Debug and Release, WK1 and WK2.
+http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html	expected actual diff pretty diff
+http/tests/security/contentSecurityPolicy/javascript-url-blocked.html

 Example diff :

--- /Volumes/Data/slave/mountainlion-production-wk2-tests/build/OpenSource/layout-test-results/http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-expected.txt
+++ /Volumes/Data/slave/mountainlion-production-wk2-tests/build/OpenSource/layout-test-results/http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-actual.txt
@@ -4,6 +4,6 @@
 
 CONSOLE MESSAGE: Unrecognized Content-Security-Policy directive 'options'.
 
-CONSOLE MESSAGE: line 1: Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "script-src http://127.0.0.1:*".
+CONSOLE MESSAGE: Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "script-src http://127.0.0.1:*".
 
 This test passes if it doesn't alert fail.
Comment 1 Radar WebKit Bug Importer 2012-05-25 18:33:20 PDT
<rdar://problem/11539513>
Comment 2 Stephanie Lewis 2012-05-25 19:00:09 PDT
Checked in failing results http://trac.webkit.org/projects/webkit/changeset/118598
Comment 3 Chris Dumez 2012-05-29 02:36:25 PDT
Created attachment 144493 [details]
Patch

The found the difference between JSC and V8 implementations of ScriptController::eventHandlerPosition(). Making JSC implementation behave as the V8 one fixes the line printing issue (because the function returns line 1 instead of line 0 in those cases). The patch does not seem to cause any regression for me.
Comment 4 Chris Dumez 2012-05-29 02:59:28 PDT
Created attachment 144498 [details]
Patch

Update patch to remove Qt-specific expectations as well.
Comment 5 Adam Barth 2012-05-29 16:26:55 PDT
Comment on attachment 144498 [details]
Patch

Thanks!
Comment 6 WebKit Review Bot 2012-05-29 17:25:30 PDT
Comment on attachment 144498 [details]
Patch

Clearing flags on attachment: 144498

Committed r118861: <http://trac.webkit.org/changeset/118861>
Comment 7 WebKit Review Bot 2012-05-29 17:25:35 PDT
All reviewed patches have been landed.  Closing bug.