debug(lua): покажем что мы доходим до drain и какие ошибки ловим
Сейчас связь Touched → handler рвётся где-то. Хочу видеть: 1. Срабатывает ли drain цикл (queue.length > 0) 2. Что именно catch съедает
This commit is contained in:
parent
eddf0b5a23
commit
d5b70ac4aa
@ -1855,6 +1855,8 @@ export function registerRobloxShim(lua, opts) {
|
||||
// Запускаем каждый в своей coroutine — wait() внутри безопасен.
|
||||
if (_pendingHandlerQueue.length > 0) {
|
||||
const queue = _pendingHandlerQueue.splice(0, _pendingHandlerQueue.length);
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`[handler-drain] draining ${queue.length} handlers`);
|
||||
for (const h of queue) {
|
||||
try {
|
||||
const a = h.args || [];
|
||||
@ -1872,8 +1874,8 @@ export function registerRobloxShim(lua, opts) {
|
||||
result.catch(() => {});
|
||||
}
|
||||
} catch (e) {
|
||||
// Тихо — handler-error это норма (yield-across-C-boundary,
|
||||
// wasmoon promise-detection и т.п.)
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('[handler-drain-catch]', e?.message || e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user