Consolidate subsumes checks and attribute handling onto BasePrincipal

RESOLVED FIXED in Firefox 41

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
mozilla41
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(5 attachments)

This is another significant unit of prep work I found myself doing on the road to bug 1163254. Splitting it out.
Blocks: 1165162
This sets the stage for the upcoming work for signed apps.
Attachment #8606444 - Flags: review?(gkrizsanits)
Attachment #8606441 - Flags: review?(padenot) → review+
Attachment #8606442 - Flags: review?(gkrizsanits) → review+
Comment on attachment 8606443 [details] [diff] [review]
Part 3 - Unify subsumes/equals logic on BasePrincipal and reduce duplicated code. v1

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

::: caps/nsPrincipal.cpp
@@ +186,5 @@
> +    nsCOMPtr<nsIURI> thisDomain, otherDomain;
> +    rv = GetDomain(getter_AddRefs(thisDomain));
> +    NS_ENSURE_SUCCESS(rv, false);
> +    rv = aOther->GetDomain(getter_AddRefs(otherDomain));
> +    NS_ENSURE_SUCCESS(rv, false);

I don't really see the point of rv here. There are other consumers of GetDomain where the return value is ignored. So I guess we either fix all of them, ignoring it here too, or if you want to check it here I think we should just crash instead of returning false.
Attachment #8606443 - Flags: review?(gkrizsanits) → review+
Attachment #8606444 - Flags: review?(gkrizsanits) → review+
Attachment #8606445 - Flags: review?(gkrizsanits) → review+
Depends on: 1170311
You need to log in before you can comment on or make changes to this bug.