Commit cbb345f
fix: guard null scene name in scene-JS Sentry fingerprint and drop review-referencing test comment
SceneShortInfo.Name is declared non-nullable but a default(SceneShortInfo)
(no sceneShortInfo passed to ReportData) yields Name == null, since C#
does not enforce non-null defaults on struct fields. AddSceneJsFingerprint
forwarded that null straight into Scope.SetFingerprint's array instead of
handling the missing-scene case, and the accompanying test locked the null
passthrough in as intended behavior rather than exercising a real fallback.
Guard with a named UNKNOWN_SCENE_NAME constant so a missing scene never
ships a null fingerprint segment, and update the test to assert the
fallback value.
Also removes an AI-narration comment in SentryReportHandlerShould.cs that
referenced this diff's own review document by section number instead of
describing the test's behavior, replacing it with a plain rationale for
why the scene name is null in that scenario.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018c638dR1vPysCMbYt2qQg51 parent 957f65f commit cbb345f
2 files changed
Lines changed: 4 additions & 5 deletions
File tree
- Explorer/Assets/DCL/PerformanceAndDiagnostics/Diagnostics/ReportsHandling
- Sentry
- Tests
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
0 commit comments