Closed Bug 1003306 Opened 6 years ago Closed 6 years ago

add mozilla::services::GetPermissionManager

Categories

(Core :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: froydnj, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

No description provided.
Running a small number of mochitests showed that we were accessing the
permission manager several thousand times through its contract ID.  Let's try
to make this a little faster.
Attachment #8414616 - Flags: review?(benjamin)
This bit gets called several thousand times over the course of a small number
of mochitests.  Let's try to speed it up a little bit by using the cached
version.

Making this change removes several thousand @mozilla.org/permissionmanager;1
accesses.
Attachment #8414617 - Flags: review?(bugs)
Comment on attachment 8414617 [details] [diff] [review]
part 2 - use services::GetPermissionManager in nsContentUtils.cpp

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

This patch is a good start, but there are a bunch of other places that need modifying--forgot to look for NS_PERMISSIONMANAGER_CONTRACTID.
Attachment #8414617 - Flags: review?(bugs)
Attachment #8414616 - Flags: review?(benjamin) → review+
Better patch that ideally will address many more cases.  This is the sort of
patch that Ehsan loves to review!
Attachment #8414617 - Attachment is obsolete: true
Attachment #8414701 - Flags: review?(ehsan)
Attachment #8414701 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/a1546ce38ecd
https://hg.mozilla.org/mozilla-central/rev/f5f4469ec95e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.