Opened on 02/08/2015 at 11:46:43 AM

Closed on 02/10/2015 at 09:23:00 AM

#1976 closed defect (fixed)

Prerendered tabs aren't handled on Chrome

Reported by: sebastian Assignee: sebastian
Priority: P3 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/6089170179063808

Description

How to reproduce

  1. Visit any website, to make sure that it gets into the history, and will be suggested by the omnibox during auto-completion, in the future.
  2. Open a new tab.
  3. Begin to type the URL of the previously visited website.
  4. Wait for the URL to be auto-completed.
  5. Wait a few more seconds to make sure the page gets prerendered.
  6. Press enter.

Observed behaviour

If the page is whitelisted, the active ABP toolbar icon keeps showing, instead switching to the grayed-out icon. And if requests were blocked, no icon badge shows up. However, following error message shows up in the log of the background page:

Unchecked runtime.lastError while running browserAction.setBadgeText: No tab with id: 113.

That is because pre-rendered tabs, even though reported through the webRequest and webNavigation API, are considered invalid when specified in API calls like chrome.browserAction.setBadgeText().

Moreover, when a tab is replaced with a prerendered tab, the chrome.tabs.onReplaced event is triggered instead chrome.tabs.onRemoved, and Adblock Plus leaks memory.

Expected behaviour

The icon and badge should correctly indicate whether the page is whitelisted or how many requests were blocked. No error message should show up in the background page. And no memory should be leaked for replaced tabs. Therfore pre-rendered tabs must be handled explicitly, modifying the browser action icon and badge, and deallocating data, once the tab got replaced.

Attachments (0)

Change History (2)

comment:1 Changed on 02/08/2015 at 11:47:51 AM by sebastian

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

comment:2 Changed on 02/10/2015 at 09:23:00 AM by sebastian

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

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.