Closed Bug 1365836 Opened 7 years ago Closed 7 years ago

Inline nsContentUtils::InternalContentPolicyTypeToExternal(OrPreload)

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

I've seen nsContentUtils::InternalContentPolicyTypeToExternal() come up in profiles a bunch of times, it's called from many important places and there is no reason for it to not be inlined.
Comment on attachment 8868868 [details] [diff] [review]
Inline nsContentUtils::InternalContentPolicyTypeToExternal(OrPreload)

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

::: dom/base/nsContentUtils.h
@@ +1156,5 @@
>  
>    /**
>     * Map internal content policy types to external ones.
>     */
> +  static inline nsContentPolicyType InternalContentPolicyTypeToExternal(nsContentPolicyType aType);

This seems like an overly long line, perhaps wrap it after the return type?

@@ +1166,5 @@
>     *   * TYPE_INTERNAL_STYLESHEET_PRELOAD
>     *
>     * Note: DO NOT call this function unless you know what you're doing!
>     */
> +  static inline nsContentPolicyType InternalContentPolicyTypeToExternalOrPreload(nsContentPolicyType aType);

Same.
Attachment #8868868 - Flags: review?(michael) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3826b6da14a9
Inline nsContentUtils::InternalContentPolicyTypeToExternal(OrPreload); r=mystor
Assignee: nobody → ehsan
https://hg.mozilla.org/mozilla-central/rev/3826b6da14a9
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: