We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa78179 commit 23bd3eaCopy full SHA for 23bd3ea
internal/core/properties.rs
@@ -525,6 +525,17 @@ impl PropertyHandle {
525
/// Access the value.
526
/// Panics if the function try to recursively access the value
527
fn access<R>(&self, f: impl FnOnce(Option<Pin<&mut BindingHolder>>) -> R) -> R {
528
+ #[cfg(slint_debug_property)]
529
+ if self.lock_flag() {
530
+ unsafe {
531
+ let handle = self.handle.get();
532
+ if handle & 0b10 == 0b10 {
533
+ let binding = &mut *((handle & !0b11) as *mut BindingHolder);
534
+ let debug_name = &binding.debug_name;
535
+ panic!("Recursion detected with property {debug_name}");
536
+ }
537
538
539
assert!(!self.lock_flag(), "Recursion detected");
540
unsafe {
541
self.set_lock_flag(true);
0 commit comments