garden-o-matic doesn't work in Safari 5.1 because Safari 5.1 lacks Function.prototype...
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 01:48:50 +0000 (01:48 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2011 01:48:50 +0000 (01:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68495

Reviewed by Dimitri Glazkov.

This patch adds an implementation of Function.prototype.bind if the browser lacks one.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
Tools/ChangeLog

index 882011a..a61d158 100644 (file)
@@ -27,6 +27,17 @@ var base = base || {};
 
 (function(){
 
+// Safari 5.1 lacks Function.prototype.bind.
+if (!('bind' in Function.prototype)) {
+    Function.prototype.bind = function(thisObject) {
+        var method = this;
+        var boundArguments = [].concat(arguments).slice(1);
+        return function() {
+            return method.apply(thisObject, boundArguments.concat(arguments));
+        }
+    }
+}
+
 base.asInteger = function(stringOrInteger)
 {
     if (typeof stringOrInteger == 'string')
index acf3954..e570719 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-20  Adam Barth  <abarth@webkit.org>
+
+        garden-o-matic doesn't work in Safari 5.1 because Safari 5.1 lacks Function.prototype.bind
+        https://bugs.webkit.org/show_bug.cgi?id=68495
+
+        Reviewed by Dimitri Glazkov.
+
+        This patch adds an implementation of Function.prototype.bind if the browser lacks one.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
+
 2011-09-20  Eric Seidel  <eric@webkit.org>
 
         [NRWT] REGRESSION: Local loader tests are failing on machines that lost /tmp/LayoutTests symlink