View previous topic :: View next topic |
Author |
Message |
Eyal Peleg Guest
|
Posted: Tue Dec 13, 2005 Post subject: A problem in components.js |
|
|
look at the following code from components.js:
Code: |
function adblockRemoveSlow(node, wnd, immediate, removalCode) {
// use timeout to collapse node - otherwise the reflow-queue doesn't catch it
// set style + collapse frameset-cols+rows for frames (if specified)
if (immediate) (removalCode) ? eval(removalCode) : (node.style.display = "none");
else {
var nodeIndex = adblockNodeIndex(wnd, node);
wnd.setTimeout(
"var node = window._AdblockObjects["+nodeIndex+"];\
"+ (removalCode ? removalCode : "node.style.display = 'none';") +"\
delete window._AdblockObjects["+nodeIndex+"];", 0); // no content will be loaded
}
}
|
the problem:
when the code in the setTimeout executes it is possible that
window._AdblockObjects would be null,
when this happens, tring to reference a specific element in the array results in the error
"window._AdblockObjects has no properties"
on chrome://adblock/content/component.js
This was reported by one of the users of my JavaScript Bug Hunting Service.
Eyal Peleg
http://jsbughunter.com |
|
Back to top |
|
 |
Eyal Peleg Guest
|
Posted: Wed Dec 14, 2005 Post subject: Are the programmers of adblock looking at this stuff ? |
|
|
I just wanted to know if someone will act upon this issue ? or not ?
is there a different place I should report this to ?
Eyal |
|
Back to top |
|
 |
Guest
|
Posted: Wed Dec 14, 2005 Post subject: |
|
|
yeah mcm is working on it..
I hate javascript and flash pages if you have it disable youll get a blank page, and it just sets there until you enabled javascript? can webmaster think about all users not everybody uses flash or javascript, uses css and html you dimwits. i also hate javascript links. and redirects and cookies. |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Wed Dec 14, 2005 Post subject: |
|
|
Eyal:
The window._AdblockObjects approach is no longer in use. It was originally needed due to security-restrictions on timeouts in unprivileged-context. Adblock's component is now auto-registered under Firefox, so we don't leverage profile-registration of component-code in the unprivileged hidden-window, anymore.
.
Since you bumped the topic, I'll add: one post was all you needed.
--
Nightly 40 (internal): linked. |
|
Back to top |
|
 |
Eyal Peleg Guest
|
Posted: Wed Dec 14, 2005 Post subject: what do you mean no longer in use ? |
|
|
How do you mean not in use ?
It is part of the code in components.js of adblock that I downloaded just a few days ago,
and As I said I see those errors actually happening, it is not a theoretical issue.
Eyal |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Wed Dec 14, 2005 Post subject: |
|
|
I mean: you should click the Nightly 40 link -- that's why I linked it.
.
Even if the problem had never been resolved, it's encapsulated in a setTimeout, and doesn't present a significant issue.
ps: you run an amusing site. |
|
Back to top |
|
 |
Eyal Peleg Guest
|
Posted: Mon Dec 26, 2005 Post subject: |
|
|
>you should click the Nightly 40 link
I don't know what are you referring to,
anyway I am not a user of adblock
and was just reporting this to you as a courtesy because
it came up on the reports for my clients.
> ps: you run an amusing site.
It is not intended to be amusing, (or did you want to say amazing ?)
JSBugHunter.com is a real service and you would be surprised at the amounts of javascript errors people & companies have on their sites due to a variety of reasons. You can try it out yourself if you have a website,
It is as simple as adding a counter to you site.
again - you might be surprised.
Eyal |
|
Back to top |
|
 |
|