Opened 4 years ago

Closed 4 years ago

#2265 closed change (fixed)

Remove deprecated logic from Utils.runAsync() on Chrome/Opera/Safari

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

http://codereview.adblockplus.org/5173395171835904

Description

Background

Utils.runAsync() is used to run a callback asynchronously. When that function was introduced in Adblock Plus for Firefox, there was no Function.bind(). So Utils.runAsync() optionally takes the context and arguments the callback is called with. However, this isn't necessary anymore, and with #2264 the core code will bind the callback before passing it as single argument to Utils.runAsync(). So we can simplify the implementation here as well.

What to change

Simplify the implementation of Utils.runAsync(), dropping support for specifying this and arguments passed to the callback. And adapt code using Uitls.runAsync() binding the callback there.

Change History (2)

comment:1 Changed 4 years ago by sebastian

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

comment:2 Changed 4 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.