window.top gets undefined on some pages if Adblock Plus is installed

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
9 years ago
8 years ago

People

(Reporter: gaubugzilla, Unassigned)

Tracking

(Blocks: 1 bug)

1.9.0 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
The page http://nikerunning.nike.com/nikeplus/ doesn't open correctly if Adblock Plus is installed. The Error Console shows the following error message:

Error: top is undefined
Source File: javascript:top.location+"__flashplugin_unique__"
Line: 1

So apparently the Flash object on that page tries to access top - but it isn't defined for some reason. Exactly the same issue is visible on http://www.symantec.com/business/security_response/landing/spam/ though by now they worked around it and at least show something.

The effect goes away if Adblock Plus is disabled on the site (this doesn't remove the content policy, merely causes it to return early). This means that it isn't triggered by the content policy itself but rather something Adblock Plus does inside the content policy. I'll try to find out what that is.

Symptoms are very similar to bug 453825 but this issue only happens on 1.9.0 branch.
(Reporter)

Comment 1

9 years ago
Created attachment 385552 [details]
Content policy for testing

Turns out the important part here is registration of a DOMNodeRemoved event handler. To reproduce without any extensions, download nsTestPolicy.js from attachment into the components/ directory of your Firefox installation. Put an .autoreg file into your Firefox profile and restart Firefox. You should be able to reproduce the issue (in Firefox 3.0 only, not Firefox 3.5).

I will work around this issue by removing this DOMNodeRemoved listener, this is long overdue anyway.
(Reporter)

Comment 2

9 years ago
Checked in the workaround: http://hg.mozdev.org/adblockplus/rev/7b9d6465e0d7
(Reporter)

Comment 3

8 years ago
Given that 1.9.0 branch is no longer supported, WONTFIX I guess.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.