diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart index 5ec3890a719..8df5e10d413 100644 --- a/pkg/vm/bin/kernel_service.dart +++ b/pkg/vm/bin/kernel_service.dart @@ -185,6 +185,8 @@ Future _processLoadRequest(request) async { final bool strong = request[5]; final int isolateId = request[6]; final List sourceFiles = request[7]; + // TODO(bkonyi): this still needs to be hooked in. + // final bool suppressWarnings = request[8]; Compiler compiler; // TODO(aam): There should be no need to have an option to choose @@ -284,7 +286,8 @@ train(String scriptUri, String platformKernel) { false /* incremental */, false /* strong */, 1 /* isolateId chosen randomly */, - null /* source files */ + null /* source files */, + false /* suppress warnings */, ]; _processLoadRequest(request); } diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc index f74e67ad64a..9b804c78e21 100644 --- a/runtime/vm/kernel_isolate.cc +++ b/runtime/vm/kernel_isolate.cc @@ -34,6 +34,10 @@ DEFINE_FLAG(bool, show_kernel_isolate, false, "Show Kernel service isolate as normal isolate."); +DEFINE_FLAG(bool, + suppress_fe_warnings, + false, + "Suppress warnings from the FE."); const char* KernelIsolate::kName = DART_KERNEL_ISOLATE_NAME; Dart_IsolateCreateCallback KernelIsolate::create_callback_ = NULL; @@ -361,6 +365,11 @@ class KernelCompilationRequest : public ValueObject { } else { files.type = Dart_CObject_kNull; } + + Dart_CObject suppress_warnings; + suppress_warnings.type = Dart_CObject_kBool; + suppress_warnings.value.as_bool = FLAG_suppress_fe_warnings; + Dart_CObject* message_arr[] = {&tag, &send_port, &uri, @@ -368,7 +377,8 @@ class KernelCompilationRequest : public ValueObject { &dart_incremental, &dart_strong, &isolate_id, - &files}; + &files, + &suppress_warnings}; message.value.as_array.values = message_arr; message.value.as_array.length = ARRAY_SIZE(message_arr); // Send the message.