Closed Bug 507881 Opened 10 years ago Closed 10 years ago

remove useless "|| null" fallback in browserGlue.sanitize(window) calls

Categories

(Firefox :: General, defect, trivial)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
Firefox 3.6a1

People

(Reporter: dao, Assigned: dao)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
It doesn't make sense. The window objects must exist there.
Also, the Sanitizer.sanitize return value is entirely useless and never looked at.
Attachment #392133 - Flags: review?(gavin.sharp)
_checkAndSanitize in sanitize.js checks if the return value is null, which is strange because that code wasn't even added until after sanitize had been changed to always return null...
(In reply to comment #1)
> _checkAndSanitize in sanitize.js checks if the return value is null

That's Sanitizer.prototype.sanitize, not Sanitizer.sanitize.
(In reply to comment #3)
> Can you remove the || at
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js#493
> too?

Sanitizer.prototype.sanitize actually returns an object with errors or null otherwise.
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/c116e4a364c8
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
You need to log in before you can comment on or make changes to this bug.