Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
deps: V8: cherry-pick beebee4f80ff
Original commit message:
```
cpu-profiler: Use Handle version of SourcePositionTableIterator

The surrounding code can trigger an allocation through InliningStack
which can eventually end up allocating a line ends array.

This is fine as-is because the existing iterator code makes a copy
of the byte array. It just triggers the no_gc dcheck in debug mode.

Fixed: v8:10778
Change-Id: Ic8c502767ec6c3d3b1f5e84df60638bd2fc6be75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339102
Auto-Submit: Peter Marshall <[email protected]>
Commit-Queue: Tobias Tebbi <[email protected]>
Reviewed-by: Tobias Tebbi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#69247}
```

Refs: v8/v8@beebee4

PR-URL: #37293
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
psmarshall authored and juanarbol committed Mar 2, 2021
commit 8d3fc8d51b18ae5d5cd65391c0b1bc08123380df
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.45',
'v8_embedder_string': '-node.46',

##### V8 defaults for Node.js #####

Expand Down
3 changes: 2 additions & 1 deletion deps/v8/src/profiler/profiler-listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ void ProfilerListener::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
// profiler as is stored on the code object, except that we transform source
// positions to line numbers here, because we only care about attributing
// ticks to a given line.
for (SourcePositionTableIterator it(abstract_code.source_position_table());
for (SourcePositionTableIterator it(
handle(abstract_code.source_position_table(), isolate_));
!it.done(); it.Advance()) {
int position = it.source_position().ScriptOffset();
int inlining_id = it.source_position().InliningId();
Expand Down