Upgrade e5-shim to v4.0.0
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 10 Jul 2014 20:44:32 +0000 (22:44 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 10 Jul 2014 23:10:47 +0000 (01:10 +0200)
Source code:
 https://github.com/es-shims/es5-shim/blob/v4.0.0/es5-shim.js

Follows-up 61c81dedcdca49, and ea307ea.

Notable changes;
* Removes breaking polyfill for Array#splice
  https://github.com/es-shims/es5-shim/issues/255

Change-Id: Id1bf4b5f35fed05817f77e087cd489aed719ecd5

RELEASE-NOTES-1.24
resources/lib/es5-shim/es5-shim.js

index ec31355..f4acc37 100644 (file)
@@ -110,6 +110,7 @@ production.
 * Upgrade Moment.js to v2.7.0.
 * (bug 67042) Added support for the HTML5 <rtc> tag for East Asian typography.
 * Upgrade Sinon.JS to 1.10.3.
+* Added the es5-shim polyfill for older or non-compliant javascript engines.
 
 === Bug fixes in 1.24 ===
 * (bug 49116) Footer copyright notice is now always displayed in user language
index d20aa1b..4595994 100644 (file)
@@ -366,7 +366,6 @@ var spliceWorksWithEmptyObject = (function () {
     ArrayPrototype.splice.call(obj, 0, 0, 1);
     return obj.length === 1;
 }());
-var omittingSecondSpliceArgIsNoop = [1].splice(0).length === 0;
 defineProperties(ArrayPrototype, {
     splice: function splice(start, deleteCount) {
         if (arguments.length === 0) { return []; }
@@ -375,14 +374,14 @@ defineProperties(ArrayPrototype, {
         if (arguments.length > 0 && typeof deleteCount !== 'number') {
             args = _Array_slice_.call(arguments);
             if (args.length < 2) {
-                args.push(toInteger(deleteCount));
+                args.push(this.length - start);
             } else {
                 args[1] = toInteger(deleteCount);
             }
         }
         return array_splice.apply(this, args);
     }
-}, !omittingSecondSpliceArgIsNoop || !spliceWorksWithEmptyObject);
+}, !spliceWorksWithEmptyObject);
 
 // ES5 15.4.4.12
 // http://es5.github.com/#x15.4.4.13