Skip to content

Commit 407cce9

Browse files
committed
Revert "Stop using Function methods which are tacked onto Function.prototype"
This reverts commit ad44bae. Because Function.prototype.bind is a native function in all environments supported by this file. http://kangax.github.io/compat-table/es5/#Function.prototype.bind And also I didn't apply the change right and broke the build...
1 parent ad44bae commit 407cce9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

javascript/webdriver/promise.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,8 @@ promise.Promise.prototype.resolve_ = function(newState, newValue) {
410410
// 2.3.2
411411
newValue = /** @type {!promise.Thenable} */(newValue);
412412
newValue.then(
413-
goog.bind(
414-
this.unblockAndResolve_, this, promise.Promise.State_.FULFILLED),
415-
goog.bind(
416-
this.unblockAndResolve_, this, promise.Promise.State_.REJECTED));
413+
this.unblockAndResolve_.bind(this, PromiseState.FULFILLED),
414+
this.unblockAndResolve_.bind(this, PromiseState.REJECTED));
417415
return;
418416

419417
} else if (goog.isObject(newValue)) {

0 commit comments

Comments
 (0)