Closed Bug 1638288 Opened 4 years ago Closed 4 years ago

Builds busted (if clang-plugin enabled): mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal

Categories

(Thunderbird :: General, defect, P1)

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 78.0

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

Attachments

(3 files, 1 obsolete file)

Builds are busted with clang-plugin enabled.

mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal.

From bug 1636148 - https://hg.mozilla.org/mozilla-central/rev/1a7e54a71d1d17416b7351dea51db84f936b27d0

Assignee: nobody → mkmelin+mozilla
Severity: -- → S1
Status: NEW → ASSIGNED
Priority: -- → P1
See Also: → 1636148
Attached patch bug1638288_principal_uri.patch (obsolete) — Splinter Review

The c-c part.

Attachment #9149354 - Flags: review?(benc)

Needed another fix too to fix some tests (at least). Apparently comparing principal.equals(null) isn't liked anymore. E.g. comm/mail/components/addrbook/test/browser/browser_contact_tree.js and comm/mail/test/browser/account/browser_values.js

Attachment #9149354 - Attachment is obsolete: true
Attachment #9149354 - Flags: review?(benc)
Attachment #9149368 - Flags: review?(benc)
Summary: builds busted (if clang-plugin enabled): mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal → Builds busted (if clang-plugin enabled): mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is deprecated and will be removed soon. Please consider using the new helper functions of nsIPrincipal
Version: unspecified → Trunk

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b8d9cd134ff9
Temporarily disable clang-plugin. rs=bustage-fix
https://hg.mozilla.org/comm-central/rev/091c930b9c4d
Port Bug 1636148 - Make calling nsIPrincipal->GetURI a clang-error. rs=bustage-fix DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

(The typo that was in the summary is in the code, don't change.)

Summary: Builds busted (if clang-plugin enabled): mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is deprecated and will be removed soon. Please consider using the new helper functions of nsIPrincipal → Builds busted (if clang-plugin enabled): mailnews/base/src/nsMsgContentPolicy.cpp:155:23: error: Principal->GetURI is depricated and will be removed soon. Please consider using the new helper functions of nsIPrincipal
Target Milestone: --- → Thunderbird 78.0

On that last change:

-    rv = aRequestPrincipal->GetURI(getter_AddRefs(originatorLocation));
+    BasePrincipal::Cast(loadingPrincipal)->GetURI(getter_AddRefs(originatorLocation));

Is this right? Looking at the original version, should it be:

BasePrincipal::Cast(aRequestPrinciple)->GetURI(getter_AddRefs(originatorLocation));

?

Indeed, that was wrong!

Attachment #9149508 - Flags: review?(benc)
Attachment #9149368 - Attachment description: bug1638288_principal_uri.patch → [checked in] bug1638288_principal_uri.patch
Attachment #9149368 - Flags: review?(benc)
Attachment #9149508 - Flags: review?(benc) → review+
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7ba221cc0eb4
fix mistake in previous patch. r=benc

Figured we should keep this open until the M-C part of the fix lands ( D75535 ).

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/integration/autoland/rev/9dd5b0c8f80b
don't use nsIPrincipal->GetURI for Thunderbird. r=ckerschb

OK now that the patch is approved and autoland is open, could we get this landed?

Not yet, it needs to be merged to mozilla-central first.

Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a440d58f09f8
re-enable clang-plugin - back out changeset b8d9cd134ff9. rs=me
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: