mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 13:16:05 +00:00
Update chrome.js
This commit is contained in:
parent
09aa593c53
commit
a0a1076e0f
|
@ -495,7 +495,9 @@ var ChromeObject = function() {
|
||||||
|
|
||||||
this.checkDebuggingPort = function() {
|
this.checkDebuggingPort = function() {
|
||||||
var isChecked = false;
|
var isChecked = false;
|
||||||
|
var isDone = false;
|
||||||
|
|
||||||
|
while (!isDone) {
|
||||||
try {
|
try {
|
||||||
if (this.debuggingPort > 0) {
|
if (this.debuggingPort > 0) {
|
||||||
var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort);
|
var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort);
|
||||||
|
@ -503,9 +505,13 @@ var ChromeObject = function() {
|
||||||
isChecked = true;
|
isChecked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isDone = true;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
sleep(1);
|
||||||
console.error("ChromeObject.checkDebuggingPort() -> " + e.message);
|
console.error("ChromeObject.checkDebuggingPort() -> " + e.message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return isChecked;
|
return isChecked;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user