Closed Bug 1533841 Opened 5 years ago Closed 5 years ago

`this.uriFlags` is undefined in AboutCompat.jsm

Categories

(Web Compatibility :: Interventions, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1539916

People

(Reporter: MattN, Unassigned)

References

Details

https://searchfox.org/mozilla-central/rev/d6f8590a91b71d64a1d0471cac38b6aadbe2a6e2/browser/extensions/webcompat/AboutCompat.jsm#30

if (this.uriFlags & Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT) {
  channel.owner = null;
}

channel.owner is never set to null since this.uriFlags is undefined. I think this was just copied from toolkit/components/normandy/content/AboutPages.jsm and not updated properly.

Flags: needinfo?(twisniewski)

Ah, yes, this.uriFlags doesn't exist in the final module (there were several review rounds, and this case got lost in the shuffle).

MattN: do you feel it would be best to drop this clause entirely, or safer to re-add a this.uriFlags member, just in case we ever want about:compat to use this flag as well?

Flags: needinfo?(twisniewski) → needinfo?(MattN+bmo)

I think drop the if (assuming that channel.owner = null; is what you really want)

Flags: needinfo?(MattN+bmo)

(In reply to Matthew N. [:MattN] (PM me if requests are blocking you) from comment #2)

I think drop the if (assuming that channel.owner = null; is what you really want)

It's not. The condition is supposed to evaluate to false.

Oh, yeah, true, I've been looking at too many about: page registrations in the last hour that thought this was one that had URI_SAFE_FOR_UNTRUSTED_CONTENT.

Then I suppose we might as well just drop that if-statement entirely, if it's going to cause more confusion than it's worth?

(In reply to Thomas Wisniewski [:twisniewski] from comment #5)

Then I suppose we might as well just drop that if-statement entirely, if it's going to cause more confusion than it's worth?

Correct, it's just dead code that should be deleted.

(In reply to Matthew N. [:MattN] (PM me if requests are blocking you) from comment #6)

(In reply to Thomas Wisniewski [:twisniewski] from comment #5)

Then I suppose we might as well just drop that if-statement entirely, if it's going to cause more confusion than it's worth?

Correct, it's just dead code that should be deleted.

Note I mildly suggested this in my last review :)

No longer blocks: 1539916
Blocks: 1539918
No longer blocks: 1488845

This was just fixed as part of bug 1539916.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.