fix(devtools): support Firefox/Safari stack format in findCallerName (#3469)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* fix(devtools): support Firefox/Safari stack format in findCallerName The previous regex only matched V8-style frames ("at name (source)"). SpiderMonkey (Firefox) and JavaScriptCore (Safari) use "name@source" with no spaces, causing the regex to fail and fall back to "anonymous". Now tries V8 regex first, then Gecko/JSC regex. Regexes extracted to module-level constants to avoid recompilation on every setState call. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * fix(devtools): keep findCallerName internal; test Gecko stack via Error stub - Use function declaration without export so helpers stay private - Drop redundant || undefined after regex fallback chain - Replace direct findCallerName import with integration test that stubs Error.stack to SpiderMonkey shape and asserts devtools send payload - Avoids pulling src into old-TypeScript test:types and widening public API ---------
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Diff stats
2 files+63 added−2 removed
- tests:+53 added−0 removed
- other:+10 added−2 removed