File tree Expand file tree Collapse file tree 4 files changed +7
-12
lines changed
Expand file tree Collapse file tree 4 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ describe('context', () => {
9696 expect ( isTrustedContext ( { } ) ) . toBe ( false ) ;
9797 } ) ;
9898
99- it ( 'should return true for all calls when trustedContexts is not set' , ( ) => {
100- expect ( isTrustedContext ( { } ) ) . toBe ( true ) ;
99+ it ( 'should return false for all calls when trustedContexts is not set' , ( ) => {
100+ expect ( isTrustedContext ( { } ) ) . toBe ( false ) ;
101101 } ) ;
102102 } ) ;
103103} ) ;
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ describe('signals', () => {
5353 expect ( isTrustedSignal ( { } ) ) . toBe ( false ) ;
5454 } ) ;
5555
56- it ( 'should return true for all calls when trustedSignals is not set' , ( ) => {
57- expect ( isTrustedSignal ( { } ) ) . toBe ( true ) ;
56+ it ( 'should return false for all calls when trustedSignals is not set' , ( ) => {
57+ expect ( isTrustedSignal ( { } ) ) . toBe ( false ) ;
5858 } ) ;
5959 } ) ;
6060} ) ;
Original file line number Diff line number Diff line change @@ -47,15 +47,13 @@ export function setTrustedContextSet(context: WeakSet<object>) {
4747}
4848
4949export function addTrustedContext ( contextParticipant : object ) {
50- // This should be a no-op when the trustedSignals set isn't set by runtime
50+ // This should be a no-op when the trustedContext set isn't set by runtime
5151 trustedContext ?. add ( contextParticipant ) ;
5252}
5353
5454export function isTrustedContext ( target : object ) : boolean {
5555 if ( ! trustedContext ) {
56- // The runtime didn't set a trustedContext set
57- // this check should only be performed for runtimes that care about filtering context participants to track
58- return true ;
56+ return false ;
5957 }
6058 return trustedContext . has ( target ) ;
6159}
Original file line number Diff line number Diff line change @@ -21,10 +21,7 @@ export function addTrustedSignal(signal: object) {
2121
2222export function isTrustedSignal ( target : object ) : boolean {
2323 if ( ! trustedSignals ) {
24- // The runtime didn't set a trustedSignals set
25- // this check should only be performed for runtimes that care about filtering signals to track
26- // our default behavior should be to track all signals
27- return true ;
24+ return false ;
2825 }
2926 return trustedSignals . has ( target ) ;
3027}
You can’t perform that action at this time.
0 commit comments