LibIPC: Allow opt-in UTF-8 validation on message parameters

You can now mark String message parameters with the [UTF8] attribute.
This will cause the generated decoder to perform UTF-8 validation and
reject the message if the given parameter is not a valid UTF-8 string.

This frees up the receiving side from having to do this validation at
a higher level.
This commit is contained in:
Andreas Kling 2020-05-16 14:11:35 +02:00
commit cd29844632
Notes: sideshowbarker 2024-07-19 06:36:35 +09:00
6 changed files with 39 additions and 16 deletions

View file

@ -21,7 +21,7 @@ endpoint WindowClient = 4
ScreenRectChanged(Gfx::Rect rect) =|
WM_WindowRemoved(i32 wm_id, i32 client_id, i32 window_id) =|
WM_WindowStateChanged(i32 wm_id, i32 client_id, i32 window_id, bool is_active, bool is_minimized, bool is_frameless, i32 window_type, String title, Gfx::Rect rect) =|
WM_WindowStateChanged(i32 wm_id, i32 client_id, i32 window_id, bool is_active, bool is_minimized, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::Rect rect) =|
WM_WindowIconBitmapChanged(i32 wm_id, i32 client_id, i32 window_id, i32 icon_buffer_id, Gfx::Size icon_size) =|
WM_WindowRectChanged(i32 wm_id, i32 client_id, i32 window_id, Gfx::Rect rect) =|
@ -30,7 +30,7 @@ endpoint WindowClient = 4
DragAccepted() =|
DragCancelled() =|
DragDropped(i32 window_id, Gfx::Point mouse_position, String text, String data_type, String data) =|
DragDropped(i32 window_id, Gfx::Point mouse_position, [UTF8] String text, String data_type, String data) =|
UpdateSystemTheme(i32 system_theme_buffer_id) =|