Closed Bug 1345168 Opened 7 years ago Closed 7 years ago

Get rid of OriginAttributes::Inherit

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file)

We had this method because the addonId value was not supposed to be copied when OriginAttributes was constructed from another one. Finally addonId is gone, and we can remove OriginAttributes::Inherits
Attached patch inherit.patchSplinter Review
Assignee: nobody → amarchesini
Attachment #8844540 - Flags: review?(tom)
Comment on attachment 8844540 [details] [diff] [review]
inherit.patch

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

I had two nits, but looks good to me.

::: netwerk/base/LoadInfo.cpp
@@ +141,5 @@
>        }
>      }
>    }
>  
> +  // If CSP requires SRI (require-sri-for), then store that information

I think the unindent would have been better separated, but I manually diffed it.

@@ +258,2 @@
>  
> +#ifdef DEBUG

I thought MOZ_ASSERT was only compiled into DEBUG builds, and the if() would fall away as empty, so I think the ifdef is unneeded?

::: netwerk/base/Predictor.cpp
@@ +2282,5 @@
>  
>        if (loadContext) {
> +        OriginAttributes attrs;
> +        loadContext->GetOriginAttributes(attrs);
> +        originAttributes = attrs;

Is there a reason this couldn't just be loadContext->GetOriginAttributes(originAttributes) ?
Attachment #8844540 - Flags: review?(tom) → review+
> I think the unindent would have been better separated, but I manually diffed
> it.

Right. Done.

> I thought MOZ_ASSERT was only compiled into DEBUG builds, and the if() would
> fall away as empty, so I think the ifdef is unneeded?

This is true, but I don't like to have an empty if().
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3de78a28ad06
Fix the indentation in LoadInfo.cpp, r=tjr
https://hg.mozilla.org/integration/mozilla-inbound/rev/ffed210e1e21
Get rid of OriginAttributes::Inherit, r=tjr
https://hg.mozilla.org/mozilla-central/rev/3de78a28ad06
https://hg.mozilla.org/mozilla-central/rev/ffed210e1e21
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: