Page 1 of 1

[Fixed] Dev tool/bookmarklet issues

Posted: Thu Jun 26, 2014 2:21 pm
by porl
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.

Re: Dev tool/bookmarklet issues

Posted: Mon Jun 30, 2014 11:46 am
by Giorgio Maone
Fixed in latest development build 2.6.8.30rc5, thank you.

Re: Dev tool/bookmarklet issues

Posted: Fri Jul 04, 2014 8:58 am
by porl
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.

Re: Dev tool/bookmarklet issues

Posted: Fri Jul 04, 2014 4:00 pm
by Giorgio Maone
porl wrote:XHR doesn't work in Scratchpad for some reason
The reason is that Scratchpad doesn't try as hard as NoScript does ;)