Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v8.x backport] deps: backport 9a23bdd from upstream V8 #22418

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 2
#define V8_BUILD_NUMBER 414
#define V8_PATCH_LEVEL 66
#define V8_PATCH_LEVEL 67

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
14 changes: 11 additions & 3 deletions deps/v8/src/isolate.cc
Expand Up @@ -1532,9 +1532,17 @@ void Isolate::PrintCurrentStackTrace(FILE* out) {

Handle<Object> receiver(frame->receiver(), this);
Handle<JSFunction> function(frame->function(), this);
Handle<AbstractCode> code(AbstractCode::cast(frame->LookupCode()), this);
const int offset =
static_cast<int>(frame->pc() - code->instruction_start());
Handle<AbstractCode> code;
int offset;
if (frame->is_interpreted()) {
InterpretedFrame* interpreted_frame = reinterpret_cast<InterpretedFrame*>(frame);
code = handle(AbstractCode::cast(interpreted_frame->GetBytecodeArray()),
this);
offset = interpreted_frame->GetBytecodeOffset();
} else {
code = handle(AbstractCode::cast(frame->LookupCode()), this);
offset = static_cast<int>(frame->pc() - code->instruction_start());
}

JSStackFrame site(this, receiver, function, code, offset);
Handle<String> line = site.ToString().ToHandleChecked();
Expand Down