Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/debug_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void DumpNativeBacktrace(FILE* fp) {
}

void DumpJavaScriptBacktrace(FILE* fp) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Isolate* isolate = v8::Isolate::TryGetCurrent();
if (isolate == nullptr) {
return;
}
Expand Down
5 changes: 5 additions & 0 deletions test/cctest/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,8 @@ TEST(UtilTest, SPrintF) {
const std::string with_zero = std::string("a") + '\0' + 'b';
EXPECT_EQ(SPrintF("%s", with_zero), with_zero);
}


TEST(UtilTest, DumpJavaScriptStackWithNoIsolate) {
node::DumpJavaScriptBacktrace(stderr);
}