File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ export const HEAD_EFFECT = 1 << 19;
2222export const EFFECT_HAS_DERIVED = 1 << 20 ;
2323export const EFFECT_IS_UPDATING = 1 << 21 ;
2424
25+ // `$inspect.trace` proxy path flags
26+ /** Keep path the same */
2527export const PROXY_PRESERVE_PATH = 1 << 1 ;
28+ /** Change proxy path to new "owner" */
2629export const PROXY_CHANGE_PATH = 1 << 2 ;
30+ /** "Unown" proxy, so its path becomes `[$state proxy]` */
2731export const PROXY_REMOVE_PATH = 1 << 3 ;
2832
2933export const STATE_SYMBOL = Symbol ( '$state' ) ;
Original file line number Diff line number Diff line change @@ -95,9 +95,11 @@ export function trace(label, fn) {
9595 var previously_tracing_expressions = tracing_expressions ;
9696 try {
9797 tracing_expressions = { entries : new Map ( ) , reaction : active_reaction } ;
98+
9899 var start = performance . now ( ) ;
99100 var value = fn ( ) ;
100101 var time = ( performance . now ( ) - start ) . toFixed ( 2 ) ;
102+
101103 if ( ! effect_tracking ( ) ) {
102104 // eslint-disable-next-line no-console
103105 console . log ( `${ label ( ) } %cran outside of an effect (${ time } ms)` , 'color: grey' ) ;
You can’t perform that action at this time.
0 commit comments