Opened 5 years ago

Closed 5 years ago

#1840 closed defect (fixed)

"forward" messages cause memory leaks

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

http://codereview.adblockplus.org/6471196916842496

Description

Background

The "Block element" feaure requires to send messages between frames on a page. In order to do so the background page provides the forward message type, which sends the payload back to all frames of the page the message came from. For those messages the onMessage listener indicates to call sendResponse() asynchronously by returning true. However, most messages don't result into a response. Hence the port is kept open forever and the callback is leaked.

What to change

Add a flag to the forward message type indicating that a response is expected. If this flag isn't set, the response should be ignored and the onMessagehandler must not return true (indicating that a response will be send later).

Change History (3)

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

  • Type changed from change to defect

comment:3 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.