Home / Function/ infinite_loop_guard() — svelte Function Reference

infinite_loop_guard() — svelte Function Reference

Architecture documentation for the infinite_loop_guard() function in batch.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  431e2e3a_6c7a_74a1_c2ad_9e368d12f115["infinite_loop_guard()"]
  d8e42d9d_2e3c_635c_19d3_b946a4341c0f["batch.js"]
  431e2e3a_6c7a_74a1_c2ad_9e368d12f115 -->|defined in| d8e42d9d_2e3c_635c_19d3_b946a4341c0f
  f618e317_1a72_981e_22c2_44b823813de7["flush_effects()"]
  f618e317_1a72_981e_22c2_44b823813de7 -->|calls| 431e2e3a_6c7a_74a1_c2ad_9e368d12f115
  ce73a688_30ae_14ce_08ea_030913aaf6ff["effect_update_depth_exceeded()"]
  431e2e3a_6c7a_74a1_c2ad_9e368d12f115 -->|calls| ce73a688_30ae_14ce_08ea_030913aaf6ff
  623c7d5f_8856_1cec_42aa_d58e310da5d1["invoke_error_boundary()"]
  431e2e3a_6c7a_74a1_c2ad_9e368d12f115 -->|calls| 623c7d5f_8856_1cec_42aa_d58e310da5d1
  style 431e2e3a_6c7a_74a1_c2ad_9e368d12f115 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/reactivity/batch.js lines 663–676

function infinite_loop_guard() {
	try {
		e.effect_update_depth_exceeded();
	} catch (error) {
		if (DEV) {
			// stack contains no useful information, replace it
			define_property(error, 'stack', { value: '' });
		}

		// Best effort: invoke the boundary nearest the most recent
		// effect and hope that it's relevant to the infinite loop
		invoke_error_boundary(error, last_scheduled_effect);
	}
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does infinite_loop_guard() do?
infinite_loop_guard() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/reactivity/batch.js.
Where is infinite_loop_guard() defined?
infinite_loop_guard() is defined in packages/svelte/src/internal/client/reactivity/batch.js at line 663.
What does infinite_loop_guard() call?
infinite_loop_guard() calls 2 function(s): effect_update_depth_exceeded, invoke_error_boundary.
What calls infinite_loop_guard()?
infinite_loop_guard() is called by 1 function(s): flush_effects.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free