Closed Bug 1318276 Opened 5 years ago Closed 5 years ago

Clean up CustomizableUIInternal.addShortcut

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 53
Tracking Status
firefox53 --- fixed

People

(Reporter: dao, Assigned: dao)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
- set parameter default instead of 'if (!aTargetNode) aTargetNode = aShortcutNode'
- remove the !aTargetNode null-check. It's ineffective since aShortcutNode.ownerDocument would already throw (which I don't think is a bad thing)
- move let document declaration down to where it's needed (this means that aTargetNode.hasAttribute could throw now, which again I don't think is a problem)
Attachment #8811651 - Flags: review?(jaws)
Attachment #8811651 - Flags: review?(jaws) → review+
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/115aceed9fdd
Clean up CustomizableUIInternal.addShortcut. r=jaws
https://hg.mozilla.org/mozilla-central/rev/115aceed9fdd
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
You need to log in before you can comment on or make changes to this bug.