Remove the assertion and telemetry for ensuring that documents and friends can never end up with an expanded principal

RESOLVED FIXED in Firefox 57

Status

()

enhancement
RESOLVED FIXED
2 years ago
4 months ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

In bug 1301123 we added an assertion and telemetry for this, but so far we haven't seen any violations <https://mzl.la/2xPjwFK> and the telemetry probe is about to expire now.  It's probably safe to remove this now.
Comment on attachment 8905158 [details] [diff] [review]
Remove the assertion and telemetry for ensuring that documents and friends can never end up with an expanded principal

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

::: dom/base/nsNodeInfoManager.cpp
@@ -418,5 @@
>    }
>  
>    NS_ASSERTION(aPrincipal, "Must have principal by this point!");
> -  MOZ_DIAGNOSTIC_ASSERT(!nsContentUtils::IsExpandedPrincipal(aPrincipal),
> -                        "Documents shouldn't have an expanded principal");

Should we consider keeping the assertion? It doesn't cost us much, and is probably good checking in case somebody screws this up.
Attachment #8905158 - Flags: review?(bobbyholley) → review+
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #2)
> Comment on attachment 8905158 [details] [diff] [review]
> Remove the assertion and telemetry for ensuring that documents and friends
> can never end up with an expanded principal
> 
> Review of attachment 8905158 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/base/nsNodeInfoManager.cpp
> @@ -418,5 @@
> >    }
> >  
> >    NS_ASSERTION(aPrincipal, "Must have principal by this point!");
> > -  MOZ_DIAGNOSTIC_ASSERT(!nsContentUtils::IsExpandedPrincipal(aPrincipal),
> > -                        "Documents shouldn't have an expanded principal");
> 
> Should we consider keeping the assertion? It doesn't cost us much, and is
> probably good checking in case somebody screws this up.

Sure, why not.
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d492424cba2
Remove the telemetry for ensuring that documents and friends can never end up with an expanded principal; r=bholley
https://hg.mozilla.org/mozilla-central/rev/4d492424cba2
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.