Opened 2 years ago

Closed 2 years ago

#6693 closed defect (rejected)

HTMLCollection permission denied exceptions

Reported by: kzar Assignee:
Priority: P2 Milestone:
Module: Platform Keywords:
Cc: sebastian, mjethani, tschuster Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Environment

Firefox 58.0.1
Adblock Plus (current master, 939bf6cdd435)

How to reproduce

  1. Go to about:debugging
  2. Click on "Debug" for "Adblock Plus"
  3. Go to the "Console" tab (if not selected yet)
  4. Make sure that JS errors are shown

Observed behaviour

Exception showing in the background console:

Error: Permission denied to access property "HTMLCollection"[Learn More] polyfill.js:233:23

Expected behaviour

No exception.

Change History (8)

comment:1 Changed 2 years ago by kzar

(I couldn't reproduce this so far with Firefox 59, so couldn't flesh out the details.)

comment:2 Changed 2 years ago by sebastian

  • Description modified (diff)
  • Priority changed from Unknown to P2
  • Ready set

comment:3 Changed 2 years ago by sebastian

  • Cc tschuster added

It's weird, when I evaluate HTMLCollection.prototype[Symbol.iterator] from the console, I get the respective function (without an error), in which case the code in polyfill.jswould just bail. So I'm not exactly sure, what is causing the error with Adblock Plus and what to do about it.

comment:4 Changed 2 years ago by kzar

  • Description modified (diff)

comment:5 Changed 2 years ago by kzar

I wonder if it would help if we used Object.defineProperty instead of assignment for them?

comment:6 Changed 2 years ago by sebastian

Well, the code path that assigns to HTMLCollection.prototype[Symbol.iterator] shouldn't be reached in the first place, since it already exists on Firefox.

comment:7 Changed 2 years ago by kzar

Yea, good point. I don't understand what's happening to cause this, Symbol.iterator in HTMLCollection.prototype returns true like I'd expect.

comment:8 Changed 2 years ago by sebastian

  • Resolution set to rejected
  • Status changed from new to closed

Apparently, this was a Firefox bug that has been fixed in Firefox 59 (and above). Also given that it doesn't seem to have any user-visible impact (on older/affected versions of Firefox), let's just ignore it.

Note: See TracTickets for help on using tickets.