-
Notifications
You must be signed in to change notification settings - Fork 45
Fix use of deprecated methods removed in V8 7.0 #124
Conversation
This is the last remaining blocker to unskipping |
Node.js master CI: https://ci.nodejs.org/view/post-mortem/job/nodereport-continuous-integration/292/ (✔️) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -212,7 +212,11 @@ static void PrintStackFromStackTrace(Isolate* isolate, FILE* fp) { | |||
StackTrace::kDetailed); | |||
// Print the JavaScript function name and source information for each frame | |||
for (int i = 0; i < stack->GetFrameCount(); i++) { | |||
Local<StackFrame> frame = stack->GetFrame(i); | |||
Local<StackFrame> frame = stack->GetFrame( | |||
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are versions of V8 that don't define V8_MAJOR_VERSION?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not in any versions of Node.js this module has ever supported. It may be true in long outdated versions of Node.js (e.g. deps/v8/include/v8-version.h
(where V8_MAJOR_VERSION
is currently defined) doesn't exist in Node.js' v0.10
branch).
For reference, nan
does similar checks: https://github.com/nodejs/nan/blob/19f08c2394b19a5dbe854020fed0446606d68955/nan.h#L215-L216
StackFrame::GetFrame(uint32_t index) was deprecated in V8 6.9 and removed in V8 7.0. Missed a Windows only instance in 26f88d0. Refs: nodejs#119 PR-URL: nodejs#124 Refs: nodejs#119 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
StackFrame::GetFrame(uint32_t index) was deprecated in V8 6.9 and
removed in V8 7.0.
Missed a Windows only instance in 26f88d0.
Refs: #119