Skip to content

Commit 4c0d2d7

Browse files
and-olimibrunin
authored andcommitted
[Backport] Dependency for security bug 420885124
Cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/6063587: Include script id in V8stackFrame in v8 inspector V8StackFrame objects in the v8 inspector are built from v8::StackFrame objects. However the script ID contained in the latter isn't included in the former. As a consequence this data is missing in clients of the v8 inspector. In particular,trace events that include a source location as a stack trace [1] do not have access to it. This CL adds the script id to the struct so that clients can consume the script id along with the rest of the stack frame data. [1] https://chromium-review.googlesource.com/c/chromium/src/+/6063066 Bug: 381861194 Change-Id: I30300bd8092a79a46e19ddeec4dc828fc8fc05f0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6063587 Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Andres Olivares <[email protected]> Reviewed-by: Simon Zünd <[email protected]> Auto-Submit: Andres Olivares <[email protected]> Cr-Commit-Position: refs/heads/main@{#97534} Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/659328 Reviewed-by: Moss Heim <[email protected]>
1 parent 078084e commit 4c0d2d7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

chromium/v8/include/v8-inspector.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ struct V8_EXPORT V8StackFrame {
139139
StringView functionName;
140140
int lineNumber;
141141
int columnNumber;
142+
int scriptId;
142143
};
143144

144145
class V8_EXPORT V8StackTrace {

chromium/v8/src/inspector/v8-stack-trace-impl.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ std::vector<V8StackFrame> V8StackTraceImpl::frames() const {
322322
if (frame) {
323323
ret.emplace_back(V8StackFrame{
324324
toStringView(frame->sourceURL()), toStringView(frame->functionName()),
325-
frame->lineNumber() + 1, frame->columnNumber() + 1});
325+
frame->lineNumber() + 1, frame->columnNumber() + 1,
326+
frame->scriptId()});
326327
}
327328
}
328329

0 commit comments

Comments
 (0)