You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In BigInteger.parse, after "// Optimize 10", the while loop uses digits.splice(-BigInteger.base_log10) which equates to digits.splice(-7).
This is not supported by IE (see ref #2 below) => on IE8 (in "IE8 mode"): infinite loop.
In order to overcome the problem, I have replaced this (around line 392):
var d = [];
while (digits.length >= BigInteger.base_log10) {
d.push(parseInt(digits.splice(-BigInteger.base_log10).join(''), 10));
by this:
var d = [];
while (digits.length >= BigInteger.base_log10) {
d.push(parseInt(digits.splice(digits.length-BigInteger.base_log10, BigInteger.base_log10).join(''), 10));
I have successfully run the test suite with this patched code + rhino 1.7R2-3 on Ubuntu 10.04 x86 (aka "lucid"):
./run-test
[...]
Finished in 12.175
Passed 29/29 (100.00%): PASS
In BigInteger.parse, after "// Optimize 10", the while loop uses digits.splice(-BigInteger.base_log10) which equates to digits.splice(-7).
This is not supported by IE (see ref #2 below) => on IE8 (in "IE8 mode"): infinite loop.
In order to overcome the problem, I have replaced this (around line 392):
var d = [];
while (digits.length >= BigInteger.base_log10) {
d.push(parseInt(digits.splice(-BigInteger.base_log10).join(''), 10));
by this:
var d = [];
while (digits.length >= BigInteger.base_log10) {
d.push(parseInt(digits.splice(digits.length-BigInteger.base_log10, BigInteger.base_log10).join(''), 10));
I have successfully run the test suite with this patched code + rhino 1.7R2-3 on Ubuntu 10.04 x86 (aka "lucid"):
References :
1 - splice() at MDN: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice
2 - splice() at MSDN: http://msdn.microsoft.com/en-us/library/wctc5k7s(v=VS.94).aspx
The text was updated successfully, but these errors were encountered: