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 — src: use v8::Isolate::TryGetCurrent() in DumpJavaScriptBacktrace() · nodejs/node@3a9713b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • debug_utils.cc
  • test/cctest
    • test_util.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/debug_utils.cc‎

Copy file name to clipboardExpand all lines: src/debug_utils.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void DumpNativeBacktrace(FILE* fp) {
319319
}
320320

321321
void DumpJavaScriptBacktrace(FILE* fp) {
322-
v8::Isolate* isolate = v8::Isolate::GetCurrent();
322+
v8::Isolate* isolate = v8::Isolate::TryGetCurrent();
323323
if (isolate == nullptr) {
324324
return;
325325
}
Collapse file

‎test/cctest/test_util.cc‎

Copy file name to clipboardExpand all lines: test/cctest/test_util.cc
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,7 @@ TEST(UtilTest, SPrintF) {
299299
const std::string with_zero = std::string("a") + '\0' + 'b';
300300
EXPECT_EQ(SPrintF("%s", with_zero), with_zero);
301301
}
302+
303+
TEST(UtilTest, DumpJavaScriptStackWithNoIsolate) {
304+
node::DumpJavaScriptBacktrace(stderr);
305+
}

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.