Skip to content

Commit beebee4

Browse files
psmarshallCommit Bot
authored andcommitted
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}
1 parent ab76be3 commit beebee4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/profiler/profiler-listener.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ void ProfilerListener::CodeCreateEvent(LogEventsAndTags tag,
113113
// profiler as is stored on the code object, except that we transform source
114114
// positions to line numbers here, because we only care about attributing
115115
// ticks to a given line.
116-
for (SourcePositionTableIterator it(abstract_code->source_position_table());
116+
for (SourcePositionTableIterator it(
117+
handle(abstract_code->source_position_table(), isolate_));
117118
!it.done(); it.Advance()) {
118119
int position = it.source_position().ScriptOffset();
119120
int inlining_id = it.source_position().InliningId();

0 commit comments

Comments
 (0)