NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Bug reports and enhancement requests
Post Reply
User avatar
GH113
Senior Member
Posts: 57
Joined: Thu Dec 17, 2015 1:17 pm

NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by GH113 » Thu Jan 07, 2016 4:35 pm

Hello!
STR:
Create new profile, install NoScript, restart
After restart the following message is shown:
Image
Go to any webpage that uses scripts, for ex. http://www.vimeo.com
Scripts are supposed to be blocked but they are not.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0

barbaz
Senior Member
Posts: 9279
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by barbaz » Thu Jan 07, 2016 4:40 pm

Please check the Browser Console (Ctrl-Shift-J) when this issue happens (after adding NoScript XPI, both before and after restart browser) and post here any related messages.
(if you don't know what's related, turn off CSS warnings and post everything else you see)

In the mean time I will look through the NoScript source code to see if I can spot what triggers this message.
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
Giorgio Maone
Site Admin
Posts: 8742
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by Giorgio Maone » Thu Jan 07, 2016 4:47 pm

They broke the generator syntax with the (deprecated) for...each loop.
I'm finally forced to switch all the loops to for...of, which means raising the lowest Gecko compatible version from 3.0.1 to 13.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0

barbaz
Senior Member
Posts: 9279
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by barbaz » Thu Jan 07, 2016 4:56 pm

Ah, Giorgio beat me to replying back.

For future reference, that alert means this code (in chrome://noscript/content/noscript.js) failed

Code: Select all

  get service() {
    var ns = null;
    for(var attempt=1; attempt <= 2 ;attempt++) {
      try {
        ns = Components.classes["@maone.net/noscript-service;1"].getService().wrappedJSObject;
        break;
      } catch(ex) {
        dump(ex.message);
        window.navigator.plugins.refresh();
      }
    }
    if(ns != null) {
      ns.init();
    }
    delete this.service;
    return this.service = ns;
  },
*Always* check the changelogs BEFORE updating that important software!
-

koron
Junior Member
Posts: 20
Joined: Wed Jul 18, 2012 1:44 am

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by koron » Thu Jan 07, 2016 6:14 pm

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

User avatar
Giorgio Maone
Site Admin
Posts: 8742
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by Giorgio Maone » Thu Jan 07, 2016 6:48 pm

Fixed in latest development build 2.9.0.1rc2, thanks.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0

User avatar
Thrawn
Senior Member
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by Thrawn » Fri Jan 08, 2016 3:24 am

Giorgio Maone wrote:I'm finally forced to switch all the loops to for...of, which means raising the lowest Gecko compatible version from 3.0.1 to 13.

Hmm...that's a shame, in some ways, although I expect that there's no way to really secure Firefox 3.0 anyway.

Just hypothetically, since JavaScript is interpreted, is it possible to implement some kind of feature detection and use the appropriate loop syntax for the platform?
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

barbaz
Senior Member
Posts: 9279
Joined: Sat Aug 03, 2013 5:45 pm

Re: NoScript 2.9/2.9.0.1rc1 doesn't work in Nightly 20160107

Post by barbaz » Fri Jan 08, 2016 3:31 am

Thrawn wrote:Just hypothetically, since JavaScript is interpreted, is it possible to implement some kind of feature detection and use the appropriate loop syntax for the platform?

I can't test now, but would this idea work?

Code: Select all

try {
  let unimportant_iterable = [2,3];
  for (let item of unimportant_iterable) {
    item+= 2;
  }
} catch(e){
    // for-of loop unsupported
}
*Always* check the changelogs BEFORE updating that important software!
-

Post Reply