Closed Bug 1164977 Opened 9 years ago Closed 9 years ago

Consolidate subsumes checks and attribute handling onto BasePrincipal

Categories

(Core :: Security: CAPS, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(5 files)

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.

Attachment

General

Created:
Updated:
Size: