Bug 54379 - Add basic parser for Content Security Policy
: Add basic parser for Content Security Policy
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Other Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 53572
  Show dependency treegraph
 
Reported: 2011-02-14 01:21 PST by
Modified: 2011-02-14 12:48 PST (History)


Attachments
Patch (7.43 KB, patch)
2011-02-14 01:27 PST, Adam Barth
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (7.32 KB, patch)
2011-02-14 01:38 PST, Adam Barth
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-02-14 01:21:24 PST
Add basic parser for Content Security Policy
------- Comment #1 From 2011-02-14 01:27:09 PST -------
Created an attachment (id=82296) [details]
Patch
------- Comment #2 From 2011-02-14 01:36:37 PST -------
(From update of attachment 82296 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=82296&action=review

LGTM. I look forward to seeing this testable in the next patch. :)

> Source/WebCore/page/ContentSecurityPolicy.cpp:117
> +            m_directives.append(CSPDirective(String(name), String(value)));

You should explain why you use this method for creating strings, since you say it does only 2 mallocs instead of 4.  Seems like a useful comment.
------- Comment #3 From 2011-02-14 01:38:39 PST -------
Created an attachment (id=82297) [details]
Patch for landing
------- Comment #4 From 2011-02-14 05:14:20 PST -------
(From update of attachment 82297 [details])
Rejecting attachment 82297 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-4', 'apply-..." exit_code: 1

Last 500 characters of output:
rks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
    result = func(*args)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_http.py", line 756, in https_open
    return self.do_open(conn_factory, req)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/thirdparty/autoinstalled/mechanize/_http.py", line 706, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 60] Operation timed out>

Full output: http://queues.webkit.org/results/7913501
------- Comment #5 From 2011-02-14 09:42:51 PST -------
(From update of attachment 82297 [details])
We should probably catch and ignore URLError in certain cases.
------- Comment #6 From 2011-02-14 12:48:27 PST -------
(From update of attachment 82297 [details])
Clearing flags on attachment: 82297

Committed r78497: <http://trac.webkit.org/changeset/78497>
------- Comment #7 From 2011-02-14 12:48:32 PST -------
All reviewed patches have been landed.  Closing bug.