The Adblock Project Forum Index The Adblock Project
Pull up a seat ...stay a while.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A problem in components.js

 
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main
View previous topic :: View next topic  
Author Message
Eyal Peleg
Guest





PostPosted: Tue Dec 13, 2005    Post subject: A problem in components.js Reply with quote

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





PostPosted: Wed Dec 14, 2005    Post subject: Are the programmers of adblock looking at this stuff ? Reply with quote

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






PostPosted: Wed Dec 14, 2005    Post subject: Reply with quote

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

PostPosted: Wed Dec 14, 2005    Post subject: Reply with quote

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
View user's profile Send private message
Eyal Peleg
Guest





PostPosted: Wed Dec 14, 2005    Post subject: what do you mean no longer in use ? Reply with quote

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

PostPosted: Wed Dec 14, 2005    Post subject: Reply with quote

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
View user's profile Send private message
Eyal Peleg
Guest





PostPosted: Mon Dec 26, 2005    Post subject: Reply with quote

>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
Display posts from previous:   
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group