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 StackFrame::GetFrame with isolate · nodejs/node@9478f29

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • env.cc
    • inspector_agent.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
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ void Environment::PrintSyncTrace() const {
320320
uv_os_getpid());
321321

322322
for (int i = 0; i < stack->GetFrameCount() - 1; i++) {
323-
Local<StackFrame> stack_frame = stack->GetFrame(i);
323+
Local<StackFrame> stack_frame = stack->GetFrame(isolate(), i);
324324
node::Utf8Value fn_name_s(isolate(), stack_frame->GetFunctionName());
325325
node::Utf8Value script_name(isolate(), stack_frame->GetScriptName());
326326
const int line_number = stack_frame->GetLineNumber();
Collapse file

‎src/inspector_agent.cc‎

Copy file name to clipboardExpand all lines: src/inspector_agent.cc
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,22 +476,20 @@ class NodeInspectorClient : public V8InspectorClient {
476476
}
477477

478478
void FatalException(Local<Value> error, Local<v8::Message> message) {
479+
Isolate* isolate = env_->isolate();
479480
Local<Context> context = env_->context();
480481

481482
int script_id = message->GetScriptOrigin().ScriptID()->Value();
482483

483484
Local<v8::StackTrace> stack_trace = message->GetStackTrace();
484485

485-
if (!stack_trace.IsEmpty() &&
486-
stack_trace->GetFrameCount() > 0 &&
487-
script_id == stack_trace->GetFrame(0)->GetScriptId()) {
486+
if (!stack_trace.IsEmpty() && stack_trace->GetFrameCount() > 0 &&
487+
script_id == stack_trace->GetFrame(isolate, 0)->GetScriptId()) {
488488
script_id = 0;
489489
}
490490

491491
const uint8_t DETAILS[] = "Uncaught";
492492

493-
Isolate* isolate = context->GetIsolate();
494-
495493
client_->exceptionThrown(
496494
context,
497495
StringView(DETAILS, sizeof(DETAILS) - 1),

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.