Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 function toSource(o) { return o === null ? "null" : o.toSource(); }
3 var gcgcz = /((?:.)+)((?:.)*)/; /* Greedy capture, greedy capture zero. */
4 reportCompare(["a", "a", ""].toSource(), gcgcz.exec("a").toSource());
5 reportCompare(["ab", "ab", ""].toSource(), gcgcz.exec("ab").toSource());
6 reportCompare(["abc", "abc", ""].toSource(), gcgcz.exec("abc").toSource());
8 reportCompare(["a", ""].toSource(), toSource(/((?:)*?)a/.exec("a")));
9 reportCompare(["a", ""].toSource(), toSource(/((?:.)*?)a/.exec("a")));
10 reportCompare(["a", ""].toSource(), toSource(/a((?:.)*)/.exec("a")));
12 reportCompare(["B", "B"].toSource(), toSource(/([A-Z])/.exec("fooBar")));
14 // These just mustn't crash. See bug 872971
15 try { reportCompare(/x{2147483648}x/.test('1'), false); } catch (e) {}
16 try { reportCompare(/x{2147483648,}x/.test('1'), false); } catch (e) {}
17 try { reportCompare(/x{2147483647,2147483648}x/.test('1'), false); } catch (e) {}
18 // Same for these. See bug 813366
19 try { reportCompare("".match(/.{2147483647}11/), null); } catch (e) {}
20 try { reportCompare("".match(/(?:(?=g)).{2147483648,}/ + ""), null); } catch (e) {}