/// <summary>
/// Stops profiling in the current context.
/// </summary>
/// <remarks>
/// <para>
/// Will not return an error if profiling has not started.
/// </para>
/// <para>
/// Requires an active script context.
/// </para>
/// </remarks>
/// <param name="reason">
/// The reason for stopping profiling to pass to the profiler callback.
/// </param>
public static void StopProfiling(int reason)
{
Native.ThrowIfError(Native.JsStopProfiling(reason));
}