Closed
Bug 489561
Opened 15 years ago
Closed 15 years ago
nsPrincipal should cache nsIPrefBranch and codebase_principal_support pref
Categories
(Core :: Security: CAPS, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(3 files)
4.52 KB,
patch
|
dveditz
:
review+
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
4.74 KB,
patch
|
Details | Diff | Splinter Review | |
4.74 KB,
patch
|
Details | Diff | Splinter Review |
nsPrincipal::CanEnableCapability is pretty expensive because it calls do_GetService(NS_PREFSERVICE_CONTRACTID) and GetBoolPref
Assignee | ||
Comment 1•15 years ago
|
||
This speeds up content JS DOM event dispatch nearly 10%.
Attachment #381297 -
Flags: superreview?(dveditz)
Attachment #381297 -
Flags: review?(dveditz)
Updated•15 years ago
|
Assignee: dveditz → Olli.Pettay
Comment 2•15 years ago
|
||
Comment on attachment 381297 [details] [diff] [review] patch r/sr=dveditz
Attachment #381297 -
Flags: superreview?(dveditz)
Attachment #381297 -
Flags: superreview+
Attachment #381297 -
Flags: review?(dveditz)
Attachment #381297 -
Flags: review+
Comment 3•15 years ago
|
||
This patch doesn't work right if you set the pref to true and then unset it. It'l leave the static bool true. You should be explicitly setting to false when the get fails. Also, why check observer topic but not pref name? I'd just assert both...
Assignee | ||
Comment 4•15 years ago
|
||
Ok, I'll fix those cases.
Assignee | ||
Comment 5•15 years ago
|
||
Comment 6•15 years ago
|
||
> + if (prefBranch &&
I'd prefer "!prefBranch ||" here, so we fail safe.
Assignee | ||
Comment 7•15 years ago
|
||
Assignee | ||
Comment 8•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/5a34b38593e5
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•