Opened 2 days ago

Last modified 7 hours ago

#7376 reviewing change

Remove references to XMLHttpRequest.channel

Reported by: mjethani Assignee: mjethani
Priority: P3 Milestone:
Module: Core Keywords:
Cc: sebastian, hfiguiere 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/32

Description (last modified by mjethani)

Background

adblockpluscore still uses internal Gecko APIs (#5702) via wrappers. In practice they do nothing. One of these APIs is XMLHttpRequest.channel. We create a mock version of this API in the WebExt version of Adblock Plus, but this is totally unnecessary now since the legacy extension is no longer supported.

What to change

In lib/downloader.js, stop referring to the channel property of the XMLHttpRequest object. Modify test/_common.js as well as any other test files to stop using this API.

Integration notes

After this change, there's no need for nsIHttpChannel and XMLHttpRequest.prototype.channel in lib/compat.js in adblockpluschrome; these should be removed.

Change History (10)

comment:1 Changed 2 days ago by mjethani

  • Description modified (diff)

comment:2 Changed 2 days ago by mjethani

  • Description modified (diff)

comment:3 Changed 2 days ago by mjethani

  • Owner set to mjethani

comment:4 Changed 2 days ago by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 2 days ago by mjethani

  • Blocking 5702 added

comment:6 Changed 2 days ago by mjethani

  • Cc sebastian hfiguiere added
  • Ready set

comment:7 follow-up: Changed 2 days ago by sebastian

Please add integration notes, to remove obsolete code from lib/compat.js in adblockpluschrome.

Also what would you think about using the fetch() API instead while at it?

comment:8 Changed 44 hours ago by mjethani

  • Description modified (diff)

comment:9 in reply to: ↑ 7 Changed 44 hours ago by mjethani

Replying to sebastian:

Please add integration notes, to remove obsolete code from lib/compat.js in adblockpluschrome.

Done.

Also what would you think about using the fetch() API instead while at it?

I like the idea, but that would require some study of the API to make sure it has the same semantics and fulfills the requirements. We should do it as a next step. In this step we get rid of the Cr namespace.

comment:10 Changed 7 hours ago by abpbot

A commit referencing this issue has landed:
Issue 7376 - Remove references to XMLHttpRequest.channel

Note: See TracTickets for help on using tickets.