Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#7382 closed change (duplicate)

Replace XMLHttpRequest with Fetch

Reported by: mjethani Assignee: mjethani
Priority: P2 Milestone:
Module: Core Keywords:
Cc: manifestv3 Blocked By:
Blocking: #5702 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://gitlab.com/eyeo/adblockplus/adblockpluscore/merge_requests/37

Description (last modified by mjethani)

Background

The Downloader and Synchronizer objects use XMLHttpRequest to make requests. This API is no longer going to be available with the Manifest V3 changes. Its usage should be replaced with the Fetch API.

What to change

See patch.

Change History (10)

comment:1 Changed 8 months ago by mjethani

  • Component changed from Unknown to Core
  • Description modified (diff)
  • Priority changed from Unknown to P2

comment:2 Changed 8 months ago by mjethani

  • Summary changed from Replace XMLHttpRequest with fetch to Replace XMLHttpRequest with Fetch

comment:3 Changed 8 months ago by mjethani

  • Owner set to mjethani

comment:4 Changed 8 months ago by sebastian

  • Cc manifestv3 added

For reference, this now also become relevant for manifest V3, as background pages won't have XMLHttpRequest anymore but only fetch() (just like Service Workers).

comment:5 Changed 8 months ago by mjethani

  • Description modified (diff)
  • Ready set
  • Review URL(s) modified (diff)

comment:6 Changed 8 months ago by mjethani

  • Status changed from new to reviewing

comment:7 Changed 8 months ago by kzar

  • Blocking 7381 removed

comment:8 Changed 8 months ago by kzar

  • Resolution set to duplicate
  • Status changed from reviewing to closed

Duplicate of issue 7381 as discussed there.

comment:9 follow-up: Changed 8 months ago by mjethani

We also need to add a test for when the subscription URL is invalid.

comment:10 in reply to: ↑ 9 Changed 8 months ago by mjethani

Replying to mjethani:

We also need to add a test for when the subscription URL is invalid.

Sorry, wrong ticket. ticket:7392#comment:3

Note: See TracTickets for help on using tickets.