HermesInternal being present does not imply its sampling methods are available. profileFetch currently calls them unchecked, uses global rather than globalThis, reports a profilePath even if dumping fails, and a disable failure can mask the wrapped function's original result/error. Overlapping calls also share one global profiler. I plan to make profiling best-effort, avoid overlapping ownership, preserve the wrapped function's outcome, and report a path only after a successful dump. Controlled profiler doubles will validate success, missing APIs, exceptions and nested calls.
HermesInternal being present does not imply its sampling methods are available. profileFetch currently calls them unchecked, uses global rather than globalThis, reports a profilePath even if dumping fails, and a disable failure can mask the wrapped function's original result/error. Overlapping calls also share one global profiler. I plan to make profiling best-effort, avoid overlapping ownership, preserve the wrapped function's outcome, and report a path only after a successful dump. Controlled profiler doubles will validate success, missing APIs, exceptions and nested calls.