mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 13:37:09 +00:00
fix(macros): stack overflow in invoke handler (#14170)
This commit is contained in:
parent
f5851ee00d
commit
69476d8e23
6
.changes/stack-overflow-release-build.md
Normal file
6
.changes/stack-overflow-release-build.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri": "patch:bug"
|
||||
"tauri-macros": "patch:bug"
|
||||
---
|
||||
|
||||
Fix the stack overflow when having too many commands in a single invoke handler in release build
|
||||
@ -283,10 +283,9 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream {
|
||||
macro_rules! #wrapper {
|
||||
// double braces because the item is expected to be a block expression
|
||||
($path:path, $invoke:ident) => {
|
||||
// The IIFE here is for preventing stack overflow on Windows debug build,
|
||||
// The IIFE here is for preventing stack overflow on Windows,
|
||||
// see https://github.com/tauri-apps/tauri/issues/12488
|
||||
{
|
||||
#[cfg_attr(not(debug_assertions), inline(always))]
|
||||
move || {
|
||||
#[allow(unused_imports)]
|
||||
use #root::ipc::private::*;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user