Skip to content

Commit 107e0cd

Browse files
committed
Tone down the urgancy in this doc comment.
1 parent a0d053e commit 107e0cd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎fxprof-processed-profile/src/profile.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,10 @@ impl Profile {
930930
/// process. This is used to collect stacks showing where allocations and
931931
/// deallocations happened.
932932
///
933-
/// CANNOT BE CALLED BEFORE THE MAIN THREAD FOR `process` HAS BEEN CREATED.
934-
/// `stack` MUST BE A STACK HANDLE WHICH IS VALID FOR THAT MAIN THREAD.
933+
/// Can only be called once the main thread for `process` has been created.
934+
/// `stack` must be a stack handle which is valid for that main thread.
935+
///
936+
/// # Details
935937
///
936938
/// When loading profiles with allocation samples in the Firefox Profiler, the
937939
/// UI will display a dropdown above the call tree to switch between regular
@@ -956,7 +958,11 @@ impl Profile {
956958
/// To get the stack handle, you can use [`Profile::handle_for_stack`] or
957959
/// [`Profile::handle_for_stack_frames`].
958960
///
959-
/// ## Main thread requirement
961+
/// # Panics
962+
///
963+
/// Panics if the `stack` handle is not valid for the main thread of `process`.
964+
///
965+
/// # Main thread requirement
960966
///
961967
/// Allocations are per-process, because you can allocate something one one thread
962968
/// and then free it on a different thread, and you'll still want those two operations

0 commit comments

Comments
 (0)