4d653fca by Adam Heath

Remove Function.prototype.bind monkey patch; this was due to an older

version of phantomjs that didn't have that method.
1 parent 2003e213
......@@ -453,28 +453,6 @@ module.exports = function (grunt) {
});
var requireCallback = function requireCallback(mpConfigBase, withCoverage) {
/* global requirejs:false */
Function.prototype.bind = function bind() {
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5
// internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
NOP = function() {},
fBound = function() {
return fToBind.apply(this, aArgs.concat(Array.prototype.slice.call(arguments)));
};
if (this.prototype) {
// Function.prototype doesn't have a prototype property
NOP.prototype = this.prototype;
}
fBound.prototype = new NOP();
return fBound;
};
requirejs.load = (function(oldLoad) {
return function (context, moduleName, url) {
//console.log('context=' + JSON.stringify(arguments), 'moduleName=' + moduleName, 'url=' + url);
......