зеркало из https://github.com/mozilla/pjs.git
Bug 501566: It takes too long to highlight a selected link, r=froystig, r=mfinkle
This commit is contained in:
Родитель
7e25f14be7
Коммит
f661465a29
|
@ -63,7 +63,18 @@ let Util = {
|
|||
dumpLn: function dumpLn() {
|
||||
for (var i = 0; i < arguments.length; i++) { dump(arguments[i] + ' '); }
|
||||
dump("\n");
|
||||
},
|
||||
|
||||
/** Executes aFunc after other events have been processed. */
|
||||
executeSoon: function executeSoon(aFunc) {
|
||||
let tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
|
||||
tm.mainThread.dispatch({
|
||||
run: function() {
|
||||
aFunc();
|
||||
}
|
||||
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче