Closed Bug 500715 Opened 15 years ago Closed 14 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

1.9.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jwkbugzilla, Unassigned)

References

()

Details

Attachments

(1 file)

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.
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.
Checked in the workaround: http://hg.mozdev.org/adblockplus/rev/7b9d6465e0d7
Given that 1.9.0 branch is no longer supported, WONTFIX I guess.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: