Closed Bug 1613606 Opened 4 years ago Closed 4 years ago

PermissionMessageUtils.h: definition of implicit copy constructor for 'Principal' is deprecated because it has a user-declared copy assignment operator

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: Sylvestre, Assigned: away)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Just like bug 1605659 & bug 1603409:

In file included from /var/lib/jenkins/workspace/firefox-clang-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:25:
/var/lib/jenkins/workspace/firefox-clang-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/PermissionMessageUtils.h:30:14: error: definition of implicit copy constructor for 'Principal' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  Principal& operator=(const Principal& aOther) {
             ^
/var/lib/jenkins/workspace/firefox-clang-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders/mozilla/dom/PContent.h:1857:9: note: in implicit copy constructor for 'IPC::Principal' first required here
        principal_(_principal),

With clang trunk and -Werror

See bug 1515356 comment 9 for why this comes up despite the flag that disables it.

clang-10 hits a -Werror in IPDL headers about Principal's copy constructor not being explicitly defined. We could go and fix that constructor, but in light of bug 1443956, I'm guessing it's not really a bad thing to have a discouragement against Principal when nsIPrincipal is now usable directly.

Assignee: nobody → dmajor
Status: NEW → ASSIGNED

All of these call sites were unnecessarily converting nsIPrincipal* => IPC::Principal => nsIPrincipal*.

Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f0b773f8c98
Use nsIPrincipal in BlobURLRegistrationData r=nika
https://hg.mozilla.org/integration/autoland/rev/73bdb73eb741
Bonus cleanup of IPC::Principals r=nika
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Blocks: clang-10
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: