зеркало из https://github.com/mozilla/pluotsorbet.git
Merge pull request #584 from marco-c/setZeroTimeout_when_possible
Use setZeroTimeout when possible
This commit is contained in:
Коммит
b652f8efac
|
@ -258,7 +258,7 @@ var fs = (function() {
|
|||
path = normalizePath(path);
|
||||
|
||||
if (openedFiles.findIndex(file => file && file.path === path) != -1) {
|
||||
setTimeout(() => cb(false), 0);
|
||||
setZeroTimeout(() => cb(false));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ var fs = (function() {
|
|||
newPath = normalizePath(newPath);
|
||||
|
||||
if (openedFiles.findIndex(file => file && file.path === oldPath) != -1) {
|
||||
setTimeout(() => cb(false), 0);
|
||||
setZeroTimeout(() => cb(false));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ var fs = (function() {
|
|||
|
||||
var file = openedFiles.find(file => file && file.stat && file.path === path);
|
||||
if (file) {
|
||||
setTimeout(() => cb(file.stat), 0);
|
||||
setZeroTimeout(() => cb(file.stat));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<script type="text/javascript" src="../libs/async_storage.js" defer></script>
|
||||
<script type="text/javascript" src="../libs/fs.js" defer></script>
|
||||
<script type="text/javascript" src="../timer.js" defer></script>
|
||||
<script type="text/javascript">
|
||||
console.log = function() {
|
||||
var s = Array.prototype.join.call(arguments, ",") +"\n";
|
||||
|
|
Загрузка…
Ссылка в новой задаче