Closed Bug 1171322 Opened 5 years ago Closed 4 years ago

Reduce console warning spam

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1171555

People

(Reporter: jdm, Unassigned)

References

(Blocks 1 open bug)

Details

20039   [NNNNN] WARNING: 'NS_FAILED(rv)', file gdom/workers/ServiceWorkerManager.cpp, line 2529
  20039   [NNNNN] WARNING: '!BasePrincipal::IsCodebasePrincipal(aPrincipal)', file gdom/workers/ServiceWorkerManager.cpp, line 2591

These are two of the most common warnings to see, and they tell us very little interesting. In ServiceWorkerManager::PrincipalToScopeKey, we have:

>2591   if (NS_WARN_IF(!BasePrincipal::IsCodebasePrincipal(aPrincipal))) {
>2592     return NS_ERROR_FAILURE;
>2593   }

This can fail if it's a system principal or extended principal, for example.

Similarly, in ServiceWorkerManager::GetServiceWorkerRegistrationInfo, we have:

2528   nsresult rv = PrincipalToScopeKey(aPrincipal, originAttributesSuffix);
2529   if (NS_WARN_IF(NS_FAILED(rv))) {
2530     return nullptr;
2531   }

I don't think either of these need to be NS_WARN_IF, due to how frequently we can expect them to fail.
I nuked both of these in bug 1171555.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1171555
You need to log in before you can comment on or make changes to this bug.