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 »

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: 10841
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 »

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: 9454
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 »

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: 10841
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 »

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 »

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
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 »

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
Master Bug Buster
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 »

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: 10841
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 »

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