We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed21d32 commit 848df6fCopy full SHA for 848df6f
1 file changed
src/env.cc
@@ -207,7 +207,7 @@ void InitThreadLocalOnce() {
207
}
208
209
void TrackingTraceStateObserver::UpdateTraceCategoryState() {
210
- if (!env_->owns_process_state()) {
+ if (!env_->owns_process_state() || !env_->can_call_into_js()) {
211
// Ideally, we’d have a consistent story that treats all threads/Environment
212
// instances equally here. However, tracing is essentially global, and this
213
// callback is called from whichever thread calls `StartTracing()` or
@@ -228,8 +228,7 @@ void TrackingTraceStateObserver::UpdateTraceCategoryState() {
228
TryCatchScope try_catch(env_);
229
try_catch.SetVerbose(true);
230
Local<Value> args[] = {Boolean::New(isolate, async_hooks_enabled)};
231
- cb->Call(env_->context(), Undefined(isolate), arraysize(args), args)
232
- .ToLocalChecked();
+ USE(cb->Call(env_->context(), Undefined(isolate), arraysize(args), args));
233
234
235
static std::atomic<uint64_t> next_thread_id{0};
0 commit comments