Closed Bug 1600963 Opened 4 months ago Closed 4 months ago

tidy up some json serialization stuff

Categories

(Core :: Security: CAPS, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(5 files)

While trying to understand some errors related to jsoncpp, I stumbled across this json serialization code principals have, and we can do things slightly better.

Assignee: nobody → nfroyd

By declaring the individual enum types to fit in a uint8_t, and
rearranging the templated KeyValT struct, we can pack KeyValT
to save a word of storage.

Depends on D55686

This change means fewer temporary objects, particularly nsCString objects.

Depends on D55688

Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/80ea7acaee75
reduce boilerplate for serialized keys in principals; r=mccr8
https://hg.mozilla.org/integration/autoland/rev/9a8f628488e8
reduce size of principal KeyVals; r=mccr8
https://hg.mozilla.org/integration/autoland/rev/ed26e312383c
don't lookup keys twice in the serialized JSON; r=mccr8
https://hg.mozilla.org/integration/autoland/rev/9737d57b7fd0
build fields directly in the returned array; r=mccr8
https://hg.mozilla.org/integration/autoland/rev/4c764c0dbfd8
remove some duplicate includes from ContentPrincipal.cpp; r=mccr8
You need to log in before you can comment on or make changes to this bug.