[Fixed] Dev tool/bookmarklet issues

Bug reports and enhancement requests
Post Reply
porl
Posts: 18
Joined: Fri Mar 01, 2013 2:43 pm

[Fixed] Dev tool/bookmarklet issues

Post by porl » Thu Jun 26, 2014 2:21 pm

It might be possible to reproduce this one only during a long session:

Code: Select all

/*
 * This is a JavaScript Scratchpad.
 *
 * Enter some JavaScript, then Right Click or choose from the Execute Menu:
 * 1. Run to evaluate the selected text (Ctrl+R),
 * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
 * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
 */

window.open(location)
/*
Exception: too much recursion
@chrome://noscript/content/JSURL.js:103
*/

(JSURL.js doesn't have a line 103)
and

Code: Select all

(function (u) {
    var r = new XMLHttpRequest();
    r.open('GET', u);
    r.onreadystatechange = function () {
        if (r.readyState == 4) alert(r.responseText.slice(0, 150) + '...');
    };
    r.send(null)
})(location)
/*
Exception:
@3
*/

The same code works OK with scripting permitted.

If the error messages could be improved, it might shed light on what's causing the trouble. The 'too much recursion' problem is irritating because the bookmarklet it's based on sometimes works but there's no way of telling when it will fail.
Last edited by porl on Fri Jul 04, 2014 8:59 am, edited 1 time in total.
Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

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

Re: Dev tool/bookmarklet issues

Post by Giorgio Maone » Mon Jun 30, 2014 11:46 am

Fixed in latest development build 2.6.8.30rc5, thank you.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0

porl
Posts: 18
Joined: Fri Mar 01, 2013 2:43 pm

Re: Dev tool/bookmarklet issues

Post by porl » Fri Jul 04, 2014 8:58 am

Thanks, Giorgio. I haven't seen 'too much recursion' since. XHR doesn't work in Scratchpad for some reason but it's back again in bookmarklets, which is excellent news.

Cheers.
Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

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

Re: Dev tool/bookmarklet issues

Post by Giorgio Maone » Fri Jul 04, 2014 4:00 pm

porl wrote:XHR doesn't work in Scratchpad for some reason

The reason is that Scratchpad doesn't try as hard as NoScript does ;)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0

Post Reply