Changeset 96536 in webkit
- Timestamp:
- Oct 3, 2011 1:51:21 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
r95595 r96536 32 32 Function.prototype.bind = function(thisObject) { 33 33 var method = this; 34 var boundArguments = [].concat(arguments).slice(1); 34 var boundArguments = []; 35 for (var i = 1; i < arguments.length; ++i) { 36 boundArguments.push(arguments[i]); 37 } 35 38 return function() { 36 return method.apply(thisObject, boundArguments.concat(arguments)); 39 var actualParameters = []; 40 for (var i = 0; i < boundArguments.length; ++i) { 41 actualParameters.push(boundArguments[i]); 42 } 43 for (var i = 0; i < arguments.length; ++i) { 44 actualParameters.push(arguments[i]); 45 } 46 return method.apply(thisObject, actualParameters); 37 47 } 38 48 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js
r95595 r96536 27 27 28 28 module("base"); 29 30 test("bind", 3, function() { 31 function func(a, b) { 32 equals(this.prop, 5); 33 equals(a, "banana"); 34 deepEqual(b, [2, 3, 4]); 35 } 36 37 var thisObject = { 38 "prop": 5 39 }; 40 41 var bound = func.bind(thisObject, "banana"); 42 bound([2, 3, 4]); 43 }); 44 29 45 30 46 test("joinPath", 1, function() { -
trunk/Tools/ChangeLog
r96523 r96536 1 2011-10-03 Adam Barth <abarth@webkit.org> 2 3 garden-o-matic should work in Safari 5.1 4 https://bugs.webkit.org/show_bug.cgi?id=69290 5 6 Reviewed by Sam Weinig. 7 8 My old implementation of bind was too clever by half. This one seems 9 to work better, at least according to this test. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js: 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js: 13 1 14 2011-09-29 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> 2 15
Note: See TracChangeset
for help on using the changeset viewer.