WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
65412
beforeload event doesn't block the resource correctly: it reloads over and over
https://bugs.webkit.org/show_bug.cgi?id=65412
Summary
beforeload event doesn't block the resource correctly: it reloads over and over
famlam
Reported
2011-07-30 11:13:52 PDT
Summary: A beforeload event is fired over and over all the time when the resource is blocked Steps to Reproduce: 1. install AdBlock (
http://safariadblock.com/
or for Chrome
https://chrome.google.com/webstore/detail/gighmmpiobklfepjocnamgkkbiglidom
). Disable all filter lists except for EasyList in it's options page (accessible via the button on the toolbar) 2. visit
http://movies.nytimes.com/2011/07/29/movies/cowboys-aliens-with-daniel-craig-review.html
3. open the developer tools (by choosing inspect element on the page). Go to the tab 'profiles' and run a CPU profile. Notice the function 'canload' (safari.self.tab.canLoad, directly called from the beforeload event) from the source code is called over and over all the time (resulting in high CPU usage). 4. Insert a breakpoint in the injected script 'adblock_start.js' in the function beforeloadHandler (in the line 'var el = event.target'). Notice it's always the same resource (
http://graphics8.nytimes.com/ads/images/misc/spacer.gif
) being loaded. Expected Results: Blocking the resource does block the resource Actual Results: Blocking the resource results in the resource being reloaded Happens in both Chrome and Safari.
Attachments
Add attachment
proposed patch, testcase, etc.
famlam
Comment 1
2011-08-07 06:04:05 PDT
Another reproduction case: enable the German filters of AdBlock and visit
http://www.n-tv.de/
famlam
Comment 2
2011-08-30 08:58:44 PDT
Or enable the Chinese filters and go to
http://bbs.kafan.cn/forum-25-1.html
famlam
Comment 3
2011-09-17 12:35:28 PDT
Please note we added a workaround. After 250 times we simply allow it and continue. So the page won't hang anymore. The bug still exists however.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug