Opened 5 years ago

Closed 5 years ago

#1841 closed change (fixed)

Get rid of the URI class in favor of URL objects

Reported by: sebastian Assignee: sebastian
Priority: P4 Milestone: Adblock-Plus-1.8.11-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: Blocked By:
Blocking: #1801 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):

http://codereview.adblockplus.org/4544964214128640

Description

Background

Firefox provides the nsIURI class for parsing URLs. Currently we maintain our own implementation of nsIURI for Chrome and Safari. But recent versions of Chrome and Safari come with built-in URL objects. Using URL objects will be more efficient and reduces the amount of complexity, in particular when we are going to process all URLs (including special URLs) with #1801.

What to change

Remove the URI class and use built-in URL objects instead. Implement a polyfill for older browser versions that doesn't have URL objects or all of its properties we need. Such a polyfill can easily be implemented with the help of an <a> element, which can be used to parse URLs.

Hints for testers

This change will affect all kinds of filter matching, in particular key-based whitelisting.

Change History (2)

comment:1 Changed 5 years ago by sebastian

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

comment:2 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.