GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tracing: do not attempt to call into JS when disallowed · nodejs/node@4e5271a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • env.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void InitThreadLocalOnce() {
207207
}
208208

209209
void 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

235234
static std::atomic<uint64_t> next_thread_id{0};

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.