Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3449 closed change (fixed)

Use sendRpcMessage instead of sendSyncMessage

Reported by: trev Assignee: trev
Priority: P2 Milestone: Adblock-Plus-2.7.1-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29332950/

Description

Background

Adblock Plus will currently use sendSyncMessage() in its nsIContentPolicy implementation in order to get a decision from parent. This call isn't re-entrant - no other messages can be sent while we are waiting for a response.

What to change

Use sendRpcMessage() which has exactly the same semantics but is re-entrant.

Change History (4)

comment:1 Changed 3 years ago by trev

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

comment:2 Changed 3 years ago by trev

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:3 Changed 3 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

This has been done and doesn't seem to have broken anything (I couldn't think of a good way to test this? It's just changing some synchronous code to async?).

ABP 2.7.0.4128-beta
Firefox 38 / 43 / 44 / 45 / 46.0a1 / Ubuntu 14.04 x64

comment:4 Changed 3 years ago by trev

In fact, I had trouble testing this myself - it's merely changing some async code to other async code. I couldn't see any impact of this, but as long at it didn't break anything that's fine.

Note: See TracTickets for help on using tickets.