Closed Bug 1462357 Opened 6 years ago Closed 6 years ago

Remove Gonk Interface attribute of Socket/DNS

Categories

(Core :: Networking: DNS, enhancement, P2)

50 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: mcmanus, Assigned: mcmanus)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

a per interface attribute was added to sockets/dns to enable split horizon dns resolution locally on a b2g device in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1108957

this code was only used by chrome-priv'd gonk. Its bloat and can be removed now.

There is a webidl change, but its removing an unused chrome only interface.
Comment on attachment 8976549 [details]
Bug 1462357 - remove the channel and socket interface id

https://reviewboard.mozilla.org/r/244662/#review250712

I would give a r+ but I want to see cancelAsyncResolveExtended, cancelAsyncResolveExtendedNative, asyncResolveExtended and asyncResolveExtendedNative removed.
If you want to do it in a separate patch, I'm ok with it.

::: netwerk/dns/GetAddrInfo.cpp:254
(Diff revision 1)
>  ////////////////////////////////////
>  
>  static MOZ_ALWAYS_INLINE nsresult
>  _GetAddrInfo_Portable(const char* aCanonHost, uint16_t aAddressFamily,
> -                      uint16_t aFlags, const char* aNetworkInterface,
> +                      uint16_t aFlags,
>                        AddrInfo** aAddrInfo)

indent. Move this next to aFlags.

::: netwerk/dns/PDNSRequest.ipdl:30
(Diff revision 1)
>  
>    // Pass args here rather than storing them in the parent; they are only
>    // needed if the request is to be canceled.
>    async CancelDNSRequest(nsCString hostName, OriginAttributes originAttributes,
> -                         uint32_t flags, nsCString networkInterface,
> +                         uint32_t flags,
>                           nsresult reason);

here as well.

::: netwerk/dns/nsDNSService2.cpp:326
(Diff revision 1)
>          : mResolver(res)
>          , mHost(host)
>          , mOriginAttributes(attrs)
>          , mListener(listener)
>          , mFlags(flags)
> -        , mAF(af)
> +        , mAF(af) {}

move {} in a new line

::: netwerk/dns/nsIDNSService.idl:136
(Diff revision 1)
> -     * parameter aNetwortInterface. If parameter aNetworkInterface is an empty
> -     * string function will return the same result as asyncResolve.
> -     * Setting aNetworkInterface is deprecated.
>       */
>      [implicit_jscontext, optional_argc]
>      nsICancelable asyncResolveExtended(in AUTF8String       aHostName,

This must be removed as cancelAsyncResolveExtended.

::: netwerk/dns/nsIDNSService.idl:143
(Diff revision 1)
>                                         in nsIDNSListener    aListener,
>                                         in nsIEventTarget    aListenerTarget,
>                              [optional] in jsval             aOriginAttributes);
>  
>      [notxpcom]
>      nsresult asyncResolveExtendedNative(in AUTF8String       aHostName,

Remove this.

::: netwerk/dns/nsIDNSService.idl:154
(Diff revision 1)
>      /**
>       * Attempts to cancel a previously requested async DNS lookup
> -     * This is an extended versin with a additional parameter aNetworkInterface
>       */
>      [implicit_jscontext, optional_argc]
>      void cancelAsyncResolveExtended(in AUTF8String       aHostName,

This must be removed. Can you do it in this patch? or a separate patch, but same bug.

::: netwerk/dns/nsIDNSService.idl:161
(Diff revision 1)
>                                      in nsIDNSListener    aListener,
>                                      in nsresult          aReason,
>                           [optional] in jsval             aOriginAttributes);
>  
>      [notxpcom]
>      nsresult cancelAsyncResolveExtendedNative(in AUTF8String       aHostName,

Remove this as well.
Attachment #8976549 - Flags: review?(amarchesini) → review-
Comment on attachment 8976549 [details]
Bug 1462357 - remove the channel and socket interface id

https://reviewboard.mozilla.org/r/244662/#review250712

remove more dead code - sgtm
Assignee: nobody → mcmanus
Priority: -- → P2
Whiteboard: [necko-triaged]
Comment on attachment 8976549 [details]
Bug 1462357 - remove the channel and socket interface id

https://reviewboard.mozilla.org/r/244662/#review250822

::: netwerk/dns/ChildDNSService.h:43
(Diff revisions 1 - 2)
>  
>    bool GetOffline() const;
>  private:
>    virtual ~ChildDNSService() = default;
>  
> +  nsresult CancelAsyncResolveInternal(const nsACString &aHostname,

You don't need these 2.

::: netwerk/dns/ChildDNSService.cpp:96
(Diff revisions 1 - 2)
>          !attrs.Init(aCx, aOriginAttributes)) {
>        return NS_ERROR_INVALID_ARG;
>      }
>    }
>  
> -  return AsyncResolveExtendedNative(hostname, flags,
> +  return AsyncResolveInternal(hostname, flags,

Call AsyncResolveNative

::: netwerk/dns/ChildDNSService.cpp:115
(Diff revisions 1 - 2)
> -                                    listener, target_, aOriginAttributes,
> +                              listener, target_, aOriginAttributes,
> -                                    result);
> +                              result);
>  }
>  
> -NS_IMETHODIMP
> -ChildDNSService::AsyncResolveExtended(const nsACString  &aHostname,
> +nsresult
> +ChildDNSService::AsyncResolveInternal(const nsACString        &hostname,

Merge with AsyncResolveNative

::: netwerk/dns/ChildDNSService.cpp:197
(Diff revisions 1 - 2)
>          !attrs.Init(aCx, aOriginAttributes)) {
>          return NS_ERROR_INVALID_ARG;
>      }
>    }
>  
> -  return CancelAsyncResolveExtendedNative(aHostname, aFlags,
> +  return CancelAsyncResolveInternal(aHostname, aFlags,

call CancelAsyncResolveNative

::: netwerk/dns/ChildDNSService.cpp:213
(Diff revisions 1 - 2)
> -  return CancelAsyncResolveExtendedNative(aHostname, aFlags,
> +  return CancelAsyncResolveInternal(aHostname, aFlags,
> -                                          aListener, aReason, aOriginAttributes);
> +                                    aListener, aReason, aOriginAttributes);
>  }
>  
> -NS_IMETHODIMP
> -ChildDNSService::CancelAsyncResolveExtended(const nsACString &aHostname,
> +nsresult
> +ChildDNSService::CancelAsyncResolveInternal(const nsACString &aHostname,

merge with CancelAsyncResolveNative

::: netwerk/dns/nsDNSService2.cpp:914
(Diff revisions 1 - 2)
>              !attrs.Init(aCx, aOriginAttributes)) {
>              return NS_ERROR_INVALID_ARG;
>          }
>      }
>  
> -    return CancelAsyncResolveExtendedNative(aHostname, aFlags,
> +    return CancelAsyncResolveInternal(aHostname, aFlags,

This should call CancelAsyncResolveNative

::: netwerk/dns/nsDNSService2.cpp:930
(Diff revisions 1 - 2)
> -    return CancelAsyncResolveExtendedNative(aHostname, aFlags,
> +    return CancelAsyncResolveInternal(aHostname, aFlags,
> -                                            aListener, aReason, aOriginAttributes);
> +                                      aListener, aReason, aOriginAttributes);
>  }
>  
> -NS_IMETHODIMP
> -nsDNSService::CancelAsyncResolveExtended(const nsACString &aHostname,
> +nsresult
> +nsDNSService::CancelAsyncResolveInternal(const nsACString       &aHostname,

remove this, and merge it into CancelAsyncResolveNative

::: netwerk/dns/nsDNSService2.h:68
(Diff revision 2)
>  
>      nsresult ResolveInternal(const nsACString &aHostname,
>                               uint32_t flags,
>                               const mozilla::OriginAttributes &aOriginAttributes,
>                               nsIDNSRecord **result);
> +    nsresult AsyncResolveInternal(const nsACString        &aHostname,

remove these 2
Attachment #8976549 - Flags: review?(amarchesini) → review-
Comment on attachment 8976549 [details]
Bug 1462357 - remove the channel and socket interface id

https://reviewboard.mozilla.org/r/244662/#review251348
Attachment #8976549 - Flags: review?(amarchesini) → review+
Comment on attachment 8976549 [details]
Bug 1462357 - remove the channel and socket interface id

https://reviewboard.mozilla.org/r/244662/#review251400

Good riddance!
Attachment #8976549 - Flags: review?(daniel) → review+
Pushed by mcmanus@ducksong.com:
https://hg.mozilla.org/integration/autoland/rev/610da3d903be
remove the channel and socket interface id r=bagder,baku
https://hg.mozilla.org/mozilla-central/rev/610da3d903be
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: