Skip to content

Commit 55f56cd

Browse files
committed
Fix a few js compile errors
* Document optional parameter * Remove no-op if statement * Remove use of deprecated function
1 parent 762a185 commit 55f56cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript/webdriver/promise.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ webdriver.promise.Thenable.isImplementation = function(object) {
248248
* in the pending state and may make a single transition to either a
249249
* fulfilled or rejected state, at which point the promise is considered
250250
* resolved.
251+
*
252+
* @param {webdriver.promise.ControlFlow=} opt_flow The control flow
253+
* this instance was created under. Defaults to the currently active flow.
251254
* @constructor
252255
* @implements {webdriver.promise.Thenable.<T>}
253256
* @template T
@@ -358,9 +361,6 @@ webdriver.promise.Promise.prototype.resolve_ = function(newState, newValue) {
358361
*/
359362
webdriver.promise.Promise.prototype.notifyAll_ = function(
360363
newState, newValue) {
361-
if (newState === webdriver.promise.Promise.State_.REJECTED) {
362-
}
363-
364364
this.state_ = newState;
365365
this.value_ = newValue;
366366

@@ -1912,7 +1912,7 @@ webdriver.promise.Frame_.prototype.cancelRemainingTasks = function(reason) {
19121912
// the task is being canceled, however, we need at least one errback
19131913
// to prevent the cancellation from bubbling up.
19141914
child.listeners_ = null;
1915-
child.thenCatch(goog.nullFunction);
1915+
child.promise.thenCatch(goog.nullFunction);
19161916
child.cancel(reason);
19171917
}
19181918
});

0 commit comments

Comments
 (0)