Skip to content

Commit

Permalink
[skip ci] Refactor Systrace.traceSection() to unblock CI (facebook#46994
Browse files Browse the repository at this point in the history
)

Summary:

This diff makes a small refactor on Systrace.traceSection() to unblock CI, which was broken by D64141515 

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D64276651
  • Loading branch information
mdvacca authored and facebook-github-bot committed Oct 12, 2024
1 parent 401991c commit 7748b82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ protected ReactRootView createRootView() {
if (mainComponentName != null) {
loadApp(mainComponentName);
}
return null;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public object Systrace {
@JvmStatic public fun traceInstant(tag: Long, title: String?, scope: EventScope?): Unit = Unit

@JvmStatic
public fun traceSection(tag: Long, sectionName: String, block: () -> T) {
beginSection(sectionName)
public fun <T> traceSection(tag: Long, sectionName: String, block: () -> T): T {
beginSection(tag, sectionName)
try {
return block()
} finally {
endSection(sectionName)
endSection(tag)
}
}

Expand Down

0 comments on commit 7748b82

Please sign in to comment.