Commit 17045d6
authored
Closes: #2908
Refs: #636 #944 #945 nodejs/node#59456
## Description
Due to timing, reporter.js runs before lockdown replaces the system
console with our causal console. Thus, when `makeReporter` makes a
reporter that uses some global console, it uses the platform's original
global console rather than the causal console. I don't know if this was
purposeful or good enough at the time, so I don't know whether this PR
is a workaround or a proper fix. In any case, it fixes the case of
immediate interest by using the current global console to report rather
than the original one.
### Security Considerations
@gibson042 checked below and found that the `console` property of the
global of the start compartments remains mutable after lockdown. This is
a security hazard, but is consistent with our stance on the privileges
available in the start compartment. In any case, this hazard is not
affected by this PR.
### Scaling Considerations
none
### Documentation Considerations
none
### Testing Considerations
Hard to write a regression test to ensure that a stack is output since
there is no portable agreement on what stacks look like. But not
impossible.
Manually running the test case from #2908 , we get the correct outputs
at #2908 (comment) .
Running that test case from #2908 on Node 22 and 24, we find that the
bug does not manifest there either. The problem is ***only*** on Node
20. I don't understand how that can be. In any case, this PR does fix
the behavior across all these versions.
### Compatibility Considerations
If someone suppresses the `console` replacement with `consoleTaming:
'unsafe'`, then this PR in its current state fails to workaround #2908
If some code depends on reporters using the original `console` rather
than the current one, that code might break or misbehave.
### Upgrade Considerations
none
1 parent a905de7 commit 17045d6
File tree
3 files changed
+64
-26
lines changed- packages/ses
- docs
- src
- test/error
3 files changed
+64
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
505 | 508 | | |
506 | 509 | | |
507 | | - | |
| 510 | + | |
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
8 | 40 | | |
9 | 41 | | |
10 | | - | |
| 42 | + | |
11 | 43 | | |
12 | 44 | | |
13 | 45 | | |
| |||
51 | 83 | | |
52 | 84 | | |
53 | 85 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
62 | 96 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
66 | 102 | | |
67 | 103 | | |
68 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
| |||
107 | 104 | | |
108 | 105 | | |
109 | 106 | | |
| 107 | + | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| |||
0 commit comments