Opened 3 months ago

Last modified 6 weeks ago

#4647 reviewing defect

onBeforeRequest listener throwing exception for frames without a URL

Reported by: kzar Assignee: kzar
Priority: P1 Milestone: Adblock-Plus-for-Chrome-Opera-next
Module: Platform Keywords:
Cc: trev, sebastian, BrentM, rhana@…, arthur Blocked By:
Blocking: #4598 Platform: Chrome
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29362605/

Description

Environment

adblockpluschrome 12a8449bde06
Debian Stretch
Chrome Version 54.0.2840.59 (64-bit)

How to reproduce

  1. Open the console for the extension's background page.
  2. Browse the web for a while.

Observed behaviour

Exceptions being thrown by the onBeforeRequest handler, for frames without a URL property.

Expected behaviour

Those exceptions should not be thrown.

Notes

The onBeforeRequest listener assumes that the originating frame will always have a URL. This is no longer true however since we now create frames with only the parent property in the onBeforeNavigate handler. Therefore I think this is a regression caused by Issue 4386 - Fixed determining document domain, particularly after being redirected.

We should now either ignore requests from frames without a URL or adapt the onBeforeRequest handler so that it does not assume the frame URL will be available. (Might be worthwhile since the parent frame might already have a URL.)

Change History (6)

comment:1 Changed 3 months ago by kzar

  • Blocking 4598 added

comment:2 Changed 3 months ago by kzar

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

comment:3 Changed 3 months ago by kzar

  • Review URL(s) modified (diff)

comment:4 Changed 3 months ago by kzar

  • Cc rhana@… added

comment:5 Changed 3 months ago by arthur

  • Cc arthur added

comment:6 Changed 6 weeks ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next
Note: See TracTickets for help on using tickets.