Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.__driver = options.driver;
}else{
if(options.driverType === 'chrome'){
this.__driver = new ChromeDriver();
}
}
this.__windows = [];
this.__quitted = false;
// First update should be run in the current fiber "thread" in order
// to setup the first window before any other call.
this.update();
// The update loop should run in another fiber "thread" to don't
// block the current one. If not it will not go beyond this step.
Future.task(function(){
while(true && !this.__quitted){
utils.sleep(100).wait();
this.update();
}
}.bind(this)).detach();
}
var fiberFn = function(){
var args = Array.prototype.slice.call(arguments);
// Extract and remove the cb from the arguments.
var cb = args.pop();
Future.task(function(){
fn.apply(this, args);
// Because is running with fibers is sync. Therefore
// we can call cb() after the fn ends in sync.
cb();
}.bind(this)).detach();
}
this.__makeFiber_origGiven(regexp, fiberFn);