File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ void InitThreadLocalOnce() {
207207}
208208
209209void TrackingTraceStateObserver::UpdateTraceCategoryState () {
210- if (!env_->owns_process_state ()) {
210+ if (!env_->owns_process_state () || !env_-> can_call_into_js () ) {
211211 // Ideally, we’d have a consistent story that treats all threads/Environment
212212 // instances equally here. However, tracing is essentially global, and this
213213 // callback is called from whichever thread calls `StartTracing()` or
@@ -228,8 +228,7 @@ void TrackingTraceStateObserver::UpdateTraceCategoryState() {
228228 TryCatchScope try_catch (env_);
229229 try_catch.SetVerbose (true );
230230 Local<Value> args[] = {Boolean::New (isolate, async_hooks_enabled)};
231- cb->Call (env_->context (), Undefined (isolate), arraysize (args), args)
232- .ToLocalChecked ();
231+ USE (cb->Call (env_->context (), Undefined (isolate), arraysize (args), args));
233232}
234233
235234static std::atomic<uint64_t > next_thread_id{0 };
You can’t perform that action at this time.
0 commit comments