Closed Bug 1440932 Opened 7 years ago Closed 7 years ago

Small improvements to the policy engine

Categories

(Firefox :: Enterprise Policies, enhancement)

60 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

Details

Attachments

(2 files)

- Remove a useless import of NetUtil.jsm - Add some documentation - Get rid of the automatic "on" that is prepended to the timing callbacks. This makes it harder for someone new to read and search the code (e.g. someone who is reading Policies.jsm to find out where they are coming from). We should just properly name them with the "on" prefix. - Bind the callbacks `this` object to the object in Policies.jsm implementing it. e.g. in Policies.jsm: > "BlockFoo": { > onBeforeUIStartup(manager, param) { > log.debug(this); // < previously null, now the BlockFoo object > } > } - Implement a runOnce helper function as more policies will end up needing that pattern
Comment on attachment 8953763 [details] Bug 1440932 - Add some documentation and other small improvements to the policy engine. https://reviewboard.mozilla.org/r/222972/#review229264
Attachment #8953763 - Flags: review?(ksteuber) → review+
Comment on attachment 8953764 [details] Bug 1440932 - Implement a runOnce helper function for policies. https://reviewboard.mozilla.org/r/222974/#review229266
Attachment #8953764 - Flags: review?(ksteuber) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s ebee9df2e1dd7e3a3545bea1aa2079524a490c32 -d 22901b9f9199: rebasing 448901:ebee9df2e1dd "Bug 1440932 - Add some documentation and other small improvements to the policy engine. r=bytesized" merging browser/components/enterprisepolicies/EnterprisePolicies.js merging browser/components/enterprisepolicies/Policies.jsm warning: conflicts while merging browser/components/enterprisepolicies/EnterprisePolicies.js! (edit, then use 'hg resolve --mark') warning: conflicts while merging browser/components/enterprisepolicies/Policies.jsm! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by felipc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b82d04b3bd6f Add some documentation and other small improvements to the policy engine. r=bytesized https://hg.mozilla.org/integration/autoland/rev/5d7a2c906875 Implement a runOnce helper function for policies. r=bytesized
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: