Work around a Safari JIT bug in arguments handling.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 2 Oct 2014 00:51:38 +0000 (02:51 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 2 Oct 2014 00:51:38 +0000 (02:51 +0200)
BUGS.org
src/yuu/yf.js

index 30d6f2f..1d11cc7 100644 (file)
--- a/BUGS.org
+++ b/BUGS.org
@@ -4,6 +4,9 @@
    performance.
 ** Use standard Unicode codepoints for icon fonts
    This is done via the [[https://korewanetadesu.com/pages/fontstandard.html][Font Standard]] icon font.
+** Work around incorrect Safari JIT generation.
+   Some details of the symptoms / likely-but-unproven cause at
+   https://korewanetadesu.com/safari-jit-bug.html.
 
 * v1.2
 ** DONE Override the GPU blacklist on GNU/Linux
index 5df966d..0779e7e 100644 (file)
         case 1: return function () { return f.call(this, arguments); };
         default:
             return function () {
-                arguments[length - 1] = slice(arguments, length - 1);
-                return f.apply(this, arguments);
+                var args = slice(arguments, 0, length - 1);
+                args.push(slice(arguments, length - 1));
+                return f.apply(this, args);
             };
         }
     }