Opened on 05/23/2018 at 03:21:38 PM
Closed on 05/24/2018 at 04:23:37 PM
#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
- Go to about:debugging
- Click on "Debug" for "Adblock Plus"
- Go to the "Console" tab (if not selected yet)
- 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.
Attachments (0)
Change History (8)
comment:1 Changed on 05/23/2018 at 03:22:17 PM by kzar
comment:2 Changed on 05/24/2018 at 10:35:40 AM by sebastian
- Description modified (diff)
- Priority changed from Unknown to P2
- Ready set
comment:3 Changed on 05/24/2018 at 10:43:48 AM 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:5 Changed on 05/24/2018 at 11:24:29 AM by kzar
I wonder if it would help if we used Object.defineProperty instead of assignment for them?
comment:6 Changed on 05/24/2018 at 11:36:52 AM 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 on 05/24/2018 at 11:48:37 AM 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 on 05/24/2018 at 04:23:37 PM 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.
(I couldn't reproduce this so far with Firefox 59, so couldn't flesh out the details.)