mirror of
https://github.com/lovell/sharp.git
synced 2026-02-12 17:46:13 +01:00
Wrap all async JS callbacks, help avoid possible race #3569
This commit is contained in:
@@ -145,7 +145,7 @@ class MetadataWorker : 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