Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fd265e6

Browse files
committed
Add FML assertion on resize parameter
1 parent b8c70c6 commit fd265e6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

shell/platform/linux/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ source_set("flutter_linux_sources") {
158158
]
159159

160160
deps = [
161+
"//flutter/fml:fml",
161162
"//flutter/shell/platform/common:common_cpp_enums",
162163
"//flutter/shell/platform/common:common_cpp_input",
163164
"//flutter/shell/platform/common:common_cpp_switches",

shell/platform/linux/fl_binary_messenger.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
66
#include "flutter/shell/platform/linux/fl_binary_messenger_private.h"
77

8+
#include "flutter/fml/logging.h"
89
#include "flutter/shell/platform/linux/fl_engine_private.h"
910
#include "flutter/shell/platform/linux/fl_method_codec_private.h"
1011
#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
@@ -344,6 +345,7 @@ static void resize_channel_response_cb(GObject* object,
344345
static void resize_channel(FlBinaryMessenger* messenger,
345346
const gchar* channel,
346347
int64_t new_size) {
348+
FML_DCHECK(new_size >= 0);
347349
g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
348350
g_autoptr(FlValue) args = fl_value_new_list();
349351
fl_value_append_take(args, fl_value_new_string(channel));

0 commit comments

Comments
 (0)