Skip to content

Commit

Permalink
deps: V8: cherry-pick beebee4f80ff
Browse files Browse the repository at this point in the history
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 <petermarshall@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69247}
```

Refs: v8/v8@beebee4
  • Loading branch information
psmarshall authored and santigimeno committed Feb 9, 2021
1 parent 9c438b5 commit 44aced8
Showing 1 changed file with 2 additions and 1 deletion.
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 @@ -113,7 +113,8 @@ void ProfilerListener::CodeCreateEvent(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

0 comments on commit 44aced8

Please sign in to comment.