Closed Bug 1406794 Opened 7 years ago Closed 7 years ago

Provide the CSP keywords in both UTF8 and UTF16 forms

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

This avoids the need for numerous 8-to-16-bit and 16-to-8-bit string
conversions.

The patch also introduces a higher-order macro, FOR_EACH_CSP_KEYWORD, which
defines all the stuff about the keywords in a single place and makes the code
nicer.
I originally did this because a while back I did some basic profiling of
utf8-to-utf16 and utf16-to-utf8 conversions and the "'nonce-" keyword was
coming up a lot.

Re-measuring recently that seems to have gone away, but I still think this
change makes the code nicer and so is worth landing for that reason.
Attachment #8916450 - Flags: review?(ckerschb)
Comment on attachment 8916450 [details] [diff] [review]
Provide the CSP keywords in both UTF8 and UTF16 forms

Review of attachment 8916450 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing that; I like that change. r=me
Attachment #8916450 - Flags: review?(ckerschb) → review+
Priority: -- → P2
Whiteboard: [domsecurity-active]
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd0ad3dbf357
Provide the CSP keywords in both UTF8 and UTF16 forms. r=ckerschb
https://hg.mozilla.org/mozilla-central/rev/bd0ad3dbf357
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: