Skip to content

Commit c9b4e9a

Browse files
authored
Profiler: fixed fix for threads (#653)
1 parent fc4a2db commit c9b4e9a

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

other/profiler/ProfileGen.hx

+23-24
Original file line numberDiff line numberDiff line change
@@ -235,37 +235,36 @@ class ProfileGen {
235235
}
236236

237237
var mainTid = threads[0].tid;
238-
var json : Array<Dynamic> = [];
239-
for( t in threads ) {
240-
json.push({
238+
var json : Array<Dynamic> = [for( t in threads )
239+
{
241240
pid : 0,
242241
tid : t.tid,
243242
ts : 0,
244243
ph : "M",
245244
cat : "__metadata",
246245
name : "thread_name",
247246
args : { name : t.name }
248-
});
249-
json.push({
250-
args: {
251-
data: {
252-
frameTreeNodeId: 0,
253-
frames: [
254-
{
255-
processId: 0,
256-
url: "http://_"
257-
}
258-
],
259-
persistentIds: true
260-
}
261-
},
262-
cat: "disabled-by-default-devtools.timeline",
263-
name: "TracingStartedInBrowser",
264-
pid: 0,
265-
tid: t.tid,
266-
ts: 0
267-
});
268-
}
247+
}
248+
];
249+
json.push({
250+
args: {
251+
data: {
252+
frameTreeNodeId: 0,
253+
frames: [
254+
{
255+
processId: 0,
256+
url: "http://_"
257+
}
258+
],
259+
persistentIds: true
260+
}
261+
},
262+
cat: "disabled-by-default-devtools.timeline",
263+
name: "TracingStartedInBrowser",
264+
pid: 0,
265+
tid: 0,
266+
ts: 0
267+
});
269268

270269
var count = 1;
271270
var f0 = threads[0].frames[0];

0 commit comments

Comments
 (0)