mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 13:46:19 +01:00
Wrap all async JS callbacks, help avoid possible race #3569
This commit is contained in:
@@ -106,7 +106,7 @@ class StatsWorker : public Napi::AsyncWorker {
|
||||
// Handle warnings
|
||||
std::string warning = sharp::VipsWarningPop();
|
||||
while (!warning.empty()) {
|
||||
debuglog.Call({ Napi::String::New(env, warning) });
|
||||
debuglog.MakeCallback(Receiver().Value(), { Napi::String::New(env, warning) });
|
||||
warning = sharp::VipsWarningPop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user