Closed Bug 1627707 Opened 5 years ago Closed 5 years ago

LoadInfo::LoadingPrincipal should be GetLoadingPrincipal instead.

Categories

(Core :: DOM: Security, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(3 files)

It can return null, so renaming it like that would prevents mistakes.

Mostly a matter of:

rg -l '->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

It's just a nested if which can be written with &&.

Depends on D69828

No need for temporaries, we can just construct the object in place.

Depends on D69829

Status: NEW → ASSIGNED
Type: defect → task
Priority: -- → P2
Whiteboard: [domsecurity-active]
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/058a19e11b06 Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/378ec30d9979 Deindent most of CHECK_PRINCIPAL_CSP_AND_DATA. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/65d6a90651ce Minor cleanup in LoadInfoToLoadInfoArgs. r=ckerschb
Backout by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/403e503a4a84 Backed out 3 changesets for build bustages @ mozilla::net::LoadInfo.
Attachment #9138552 - Attachment description: Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ehsan,ckerschb → Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Attachment #9138554 - Attachment description: Bug 1627707 - Minor cleanup in LoadInfoToLoadInfoArgs. r=ehsan,ckerschb → Bug 1627707 - Minor cleanup in LoadInfoToLoadInfoArgs. r=ckerschb
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/711bb3721f0d Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/1e6c40ef6b87 Deindent most of CHECK_PRINCIPAL_CSP_AND_DATA. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/7044929ad879 Minor cleanup in LoadInfoToLoadInfoArgs. r=ckerschb
Flags: needinfo?(emilio)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/c5ff52454b8e Port bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: