Why do I need to enable a domain each time I return to a tab

Ask for help about NoScript, no registration needed to post
ithinc

Re: Why do I need to enable a domain each time I return to a

Post by ithinc »

Giorgio Maone wrote: The instanceof operator calls QueryInterface internally, and it's actually the preferred way to cast interfaces in JavaScript .
Load Tabs Progressively completely screws up this because, as far as I can see, you tried to be "smart" and didn't implement QueryInterface() at all (nor any other method of webNavigation, for the matter), but used the __noSuchMethod__() catch-all trick, which is not "seen" by XPConnect at interface resolution time and therefore breaks instanceof (and possibly other XPCOM-related machinery). Technically speaking you're not implementing any interface, even though some code may see them as implemented.
No, this is not the cause. Isn't QueryInterface the only way to determine whether an interface is implemented? Gecko just didn't call QueryInterface as it promises for instanceof operator. Try the following code:

Code: Select all

({QueryInterface: function() {return this;}}) instanceof Components.interfaces.nsISupports
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Jay

Re: Why do I need to enable a domain each time I return to a

Post by Jay »

Guys, if you continue to lay the blame on each other, nobody will fix own plugin.

I'm one of many users of NS + LTP, and I've been wondering for last week why.t.f. do I have to allow the same sites every time I open them again ?

If NS_nightly get rids of the problem, then I look forward for stable release, as I don't want to use beta version.
But if I disable LTP , then I'd commit a suicide after launching FX with >150 saved tabs.
Mozilla/5.0 (Windows; U; Windows NT 6.0; PL; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Jay

Re: Why do I need to enable a domain each time I return to a

Post by Jay »

edit: ohh well ... I've just checked if there are any actualizations to plugins, and there's LTP 1.0pre3
But FX cannot install the file, because there's a problem with downloading
http://releases.mozilla.org/pub/mozilla ... re3-fx.xpi
reason -228


ehh
Mozilla/5.0 (Windows; U; Windows NT 6.0; PL; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Alan Baxter
Ambassador
Posts: 1586
Joined: Fri Mar 20, 2009 4:47 am
Location: Colorado, USA

Re: Why do I need to enable a domain each time I return to a

Post by Alan Baxter »

I got your report, Jay, but I'll leave your posts as is. I'm not going to have a kitten because of a double post. Do it myself sometimes when it's called for.
Jay wrote:If NS_nightly get rids of the problem, then I look forward for stable release, as I don't want to use beta version.
Install NoScript 1.9.9.92 from http://noscript.net/getit#devel, Jay. It's the latest and greatest, not a beta. The only reason Giorgio hasn't pushed it out through AMO is because some users get upset if NoScript is updated more frequently than they like. Giorgio explains it in http://forums.informaction.com/viewtopi ... 9867#p9867
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4
Scott_L

Re: Why do I need to enable a domain each time I return to a

Post by Scott_L »

Jay wrote:But if I disable LTP , then I'd commit a suicide after launching FX with >150 saved tabs.
Jay, don't disable LTP (or end it all), just go back to 0.9 - available from this link: https://addons.mozilla.org/en-US/firefo ... ions/91919

This is holding me over fine until a fix is released.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Why do I need to enable a domain each time I return to a

Post by Giorgio Maone »

ithinc wrote:
Giorgio Maone wrote: The instanceof operator calls QueryInterface internally, and it's actually the preferred way to cast interfaces in JavaScript .
Load Tabs Progressively completely screws up this because, as far as I can see, you tried to be "smart" and didn't implement QueryInterface() at all (nor any other method of webNavigation, for the matter), but used the __noSuchMethod__() catch-all trick, which is not "seen" by XPConnect at interface resolution time and therefore breaks instanceof (and possibly other XPCOM-related machinery). Technically speaking you're not implementing any interface, even though some code may see them as implemented.
No, this is not the cause. Isn't QueryInterface the only way to determine whether an interface is implemented? Gecko just didn't call QueryInterface as it promises for instanceof operator. Try the following code:

Code: Select all

({QueryInterface: function() {return this;}}) instanceof Components.interfaces.nsISupports
Another cause is that you probably didn't implement your wrapping inside a proper XPCOM component.
XPConnect machinery uses QueryInterface for instanceof on XPCWrappers, which are created for a JS object only when it crosses the XPCOM boundaries (e.g. when you pass them as arguments to a XPCOM method or obtain a JS-implemented XPCOM component trough createInstance()/createService()).
That's why your test on a raw (non XPCWrapped) JS Object fails.

@everybody:
just install NoScript's latest development build, it works around this LTP bug.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Jay

Re: Why do I need to enable a domain each time I return to a

Post by Jay »

thx Alan for information, seems I had obsolete version of NS ;)

Scott: I can't remember which exactly, but one of plugins I use didn't like LTP 0.9, so I had to use 1.0alpha, or use reload tabs progressively plugin.
Mozilla/5.0 (Windows; U; Windows NT 6.0; PL; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Post Reply